开发者

facebook multi-friend selector( javascript SDK), counting number of friends

开发者 https://www.devze.com 2023-02-27 01:55 出处:网络
Hi i just wanted to know, is there any way to know how many friends the user selects from the multi-friend selector generated by the followi开发者_C百科ng code.

Hi i just wanted to know, is there any way to know how many friends the user selects from the multi-friend selector generated by the followi开发者_C百科ng code.

function InviteFriends(){
     FB.ui({ method: 'apprequests',
          message: 'come on man checkout my application.'});
    }

thanks


Yes, Facebook will send back the request_ids for all the requests sent. so the number of requests would equal the number of friends selected.

How to access the request_ids is described in this tutorial: How To: Send An Application Request Using The Facebook Graph API

FB.ui({
    method: 'apprequests',
    message: 'Check out this application!',
    title: 'Send your friends an application request',
},
function (response) {
    if (response && response.request_ids) {
        // response.request_ids is what you need
    } else {
        alert('canceled');
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号