title: Facebook get number of sent requests and accepted request
body: <p>i need to make a page that will have a request dialog for a facebook page or a facebook app.
  I need to get the number of friends the user sent the request to and at the end of the day the number of request that got accpeted from the specific user.</p>
  
  <p>The scenario is for giving awards , the user that sent the most request to freinds gets an award and the user that had the most requests accepted also gets an award.</p>
  
  <p>I dont know if the seccond is possible , but i think it should be , couse games on FB give u points for sent request and also u get new missions when friends accept your request , so there mut be a way.</p>
  
  <p>--
  I will record the number of invites sent.</p>
  
  <p>Return Data
  request_ids   </p>
  
  <p>A comma-separated list of the request_ids that were created. To learn who the requests were sent to, you should loop through the information for each request object identified by a request id.</p>
  
  <pre><code>FB.ui({
                     method: 'apprequests',
                     title:'Suggest '+fbAppName+' to your friends',
                     message: 'I thought you would dig this app!',
                     data: 'gameID=96'
         }, onInviteFriend);
  
  //jquery required for ajax function
      onInviteFriend = function(response) {
          if (response &amp;&amp; response.request_ids) {
              var idsLength = response.request_ids.length;
              var idList = "";
              var data = {};
              var ajaxSettings = {};
              for (var i = 0; i &lt; idsLength; i++){
                  idList += response.request_ids[i];
                  if (i &lt; idsLength-1){
                      idList += ",";
                  }
              }
              if (idsLength &gt; 0){
                  data.idList = idList;
                  ajaxSettings = {
                      type: "GET",
                      url: sketchnpass.root+"/ajax/log-invite-sent/",
                      data: data,
                      success: sketchnpass.onSaveInvites
                  };
                  $.ajax(ajaxSettings);
              }
              //was published
          } else {
              //was not published
          }
      }
  </code></pre>
  
  <p>i think using the code above i can get the number of sent requests.</p>
  
  <p>But when some1 accepts the request how will i know that happened , does the accepted request send the user to my app along with some data?</p>