php - Facebook Application - How do i count the number of friends a sender invites? -
i doing facebook invitation (apprequest) need count number of invitation made user, can me?
the code below works counts 1 invitation no matter how many invites user sends
<script> fb.init({ appid:'<?=$myappid?>', cookie:true, status:true, xfbml:true }); function facebookinvitefriends() {//start of facebookinvitefriends var invitecounter = fb.ui({ method: 'apprequests', message: '<?=$me['name']?> has invited play game!', title: 'select friends play game!', exclude_ids: <?=$allfbstr?>, max_recipients: 5 }, function (invitecounter) { var userid = '<?=$me['id']?>'; //alert(userid); $.ajax({//ajax type: 'post', url: 'addinvitationcounter.php', data: { userid: userid }, success: function(result){ //alert("success: " + result); location.href = "myprofile.php"; }, error: function(result){ alert("error: " + result); } }); } ); } </script>
i don't know if got question right, against facebook policy.
per section v.1.
you must not incentivize users grant additional permissions or use application integration points.
and per documentation application integration points
by "application integration point" mean application info section, application tab, feed, requests (including invites), publisher, inbox attachments, chat, bookmarks, or other feature of user profile or facebook communication channel in or through application can provide, display, or deliver content directed at, on behalf of, or permission of user.
Comments
Post a Comment