title: Facebook App invitation request
body: <p>I want to send the App req to 5 people , i have managed to get the UserID's of 5 people but its always those same 5 people , isnt there a way to randomise the <code>USERID's</code> which i get from Facebook ?</p>
  
  <pre><code>&lt;script&gt;
  var profilePicsDiv = document.getElementById('profile_pics');
  
  FB.getLoginStatus(function(response) {
  
  
    FB.api({ method: 'friends.get' }, function(result) {
      Log.info('friends.get response', result);
     var user_ids="" ;
      var numFriends = result ? Math.min(5, result.length) : 0;
      if (numFriends &gt; 0) {
        for (var i=0; i&lt;numFriends; i++) {
          user_ids+= (
  
                            ',' + result[i] 
  
          );
        }
      }
      profilePicsDiv.innerHTML = user_ids;
  alert(user_ids);
  
    });
  });
  
  
   function sendRequestToRecipients() {
          var user_ids = document.getElementsByName("user_ids")[0].value;
          FB.ui({method: 'apprequests',
            message: 'My Great Request',
            to: user_ids,                        ///  How to Fill the ID's HERE ?
          }, requestCallback);
        }
  
  
  &lt;/script&gt;
  </code></pre>