Fostah
Fostah

Reputation: 2946

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 user 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.

Upvotes: 0

Views: 995

Answers (2)

Kasra Rahjerdi
Kasra Rahjerdi

Reputation: 2503

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'});

Upvotes: 1

genesis
genesis

Reputation: 50974

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'});

Upvotes: 1

Related Questions