2

Is there a way to limit the number of invitations a user can send like there was using FBML - fb:multi-friend-selector? With that you could specify "max" and it would limit the number of invitations one could send. Before the script, I will be running a db query to see how many request_ids they have generated and afterwards, I will add the request_ids to the database. However, first I need to be able to limit the requests. 50 is way too many. I am looking to get it down to 5 or 10. Right now, it works perfectly. I just need this feature.

  <script>
  function callAppReq() {
   FB.init({
     appId  : 'xxx',
     cookie: true,
     channelUrl : 'https://apps.facebook.com/app',
     oauth : true
   });
   request_ids = FB.ui({
     method: 'apprequests',
     access_token: '<?php echo $_SESSION['facebook_access_token']; ?>',
     display: 'iframe',
     filters: ['app_non_users'],

     message: 'message', 
     data: 'data'
   }); 
   }
   var t=setTimeout("callAppReq()",100);
  </script>
Brandon Bearden
  • 820
  • 11
  • 29
  • 1
    Brandon, appreciated you came back to signal you solved the issue. The proper way to do it - however - is to put your answer... in an answer! And accept it! Yes, you can answer yourself and accept - after a few days, I believe - your answer as the right one. This will even give you a bronze badge, the first time! – mac Nov 27 '11 at 14:22
  • Thanks for letting me know. I tried to answer it but it wouldn't let me. It said I had to wait 8 hours. I didn't want to waste peoples time so I just edited it. I fixed it, thanks again. – Brandon Bearden Nov 27 '11 at 20:55

1 Answers1

3

SOLVED....

I figured it out. Add max_recipients: '5' or whatever number you want less than 50. So,

request_ids = FB.ui({
     method: 'apprequests',
     access_token: '<?php echo $_SESSION['facebook_access_token']; ?>',
     display: 'iframe',
     filters: ['app_non_users'],
     max_recipients: '5',
     message: 'message', 
     data: 'data'
}); 
Brandon Bearden
  • 820
  • 11
  • 29