Reputation: 79
I need to implement a folw like that: - the user choose a friend in facebook - the user cannot chose more than one friend. - the app send a personalized message to the friend Testing with the FB.ui({method: 'apprequests', etc... I see that is not possible to limit the number of friends to select and so I can't send a very personalized message. I think the only thing is to implement an 'in app' friend selector on my own... but looking for a simpler solution.
thanks, A.
Upvotes: 0
Views: 2315
Reputation: 367
You can limit the maximum number of invitations by using max_recipients
.
Here is a sample:
FB.ui(
{
method: 'apprequests',
message: 'My Great Request',
max_recipients:1
}
,
requestCallback
)
Upvotes: 3
Reputation: 5433
You can use the 'SEND dialog' . It will help you send personal messages to a single friend..
It will land on their inbox. But in this dialog also you can choose multiple friends..
And another restriction is that this dialog is mainly used for personal 'sharing' , so the sharing link is necessary
https://developers.facebook.com/docs/reference/dialogs/send/
Upvotes: 0
Reputation: 12721
A use a jquery plug-in for presenting my own friend selectors.
Once a friend is selected, then you pass the friend ID in the app request so only the send dialog with no friend selector is presented. I use this in the someecards facebook app if you want to see it in action.
Upvotes: 0