How can I retrieve the user IDs that were checked in the multi-friend-selector generated by the Application Request Dialog? Ive tried :
FB.ui({ method: 'apprequests',
message: 'Here is a new Requests dialog...'
}, function (response) {
if (response && response.request_ids) {
console.log(response.request_ids);
}
});
But I dont get any results in the console. Thanks
Here is my code.
FB.ui({
method: 'apprequests',
message: 'Here is a new Requests dialog...'
}, function(res){
if (!res || !res.request_ids) { /* user canceled */ return; }
var req_ids = res.request_ids;
var _batch = [];
for(var i=0; i<req_ids.length; i++ ){
_batch.push({"method":"get","relative_url":req_ids[i]});
}
if(_batch.length>0){
FB.api('/','POST',{batch:_batch},function(res){
//res contains uids.
});
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With