Set friend ID's in an apprequest using FB.ui?
Using the Facebook JS SDK(FB.ui), is it possible to supply a list of facebook use开发者_JS百科r id's using the 'apprequest' method?
Looking at the docs I see you can set "to:", however I am not sure if this allows you to send a json array of user id's or not. Any help is appreciated!
FB.ui({
method: 'apprequests',
to:[list of ids?],
message: 'You should learn more about this awesome game.',
data: 'tracking information for the user'
});
I either need to send it to a specific list users or have the boxes prechecked in friend selector if that is possible.
What about to try it? You can always do
FB.ui({method: 'apprequests',to:4, message: 'You should learn more about this awesome game.', data: 'tracking information for the user'});
FB.ui({method: 'apprequests',to:5, message: 'You should learn more about this awesome game.', data: 'tracking information for the user'});
FB.ui({method: 'apprequests',to:6, message: 'You should learn more about this awesome game.', data: 'tracking information for the user'});
You could supply the filters parameter which will allow you to have custom lists of users. They wouldn't be pre-selected but you can limit it so that the only friends that show up are the ones you care about.
FB.ui({method: 'apprequests', message: 'Try this out!', filters: [{name: 'friends to invite', user_ids: [1, 2, 3, 4, 5]}, data: 'tracking data'});
精彩评论