Reputation: 81
function sendRequestToManyRecipients() {
FB.ui({method: 'apprequests',
message: 'My Great Request',
}, requestCallback);
}
function requestCallback(response) {
}
apparently its supposed to return something like this
{
“request_ids”: [
0: [request_id]
1: [request_id]
...
]
}
i need to get the ids from the response and execute another function using the ids how can i do that? thanks in advance
Upvotes: 1
Views: 2895
Reputation: 1137
I guess you means ids is the id of recipient ids, so the easiest way is
Enable "Request 2.0 Efficient" you can enable it in your application setup page (advance tab)
Use the following:
function requestCallback(response)
{
var ids = response["to"];
for (var i = 0; i < ids.length; ++i)
{
//"ids[i]" is what you want.
}
}
Upvotes: 1