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>
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'
});