Limit friends invitation in Facebook Application + Invited users IDS + disabling invited users

1.6k views Asked by At

I'm stuck on these three things. Firstly, I'd like to limit invitation count depending on users action i.e. max invitations to 3 friends. Not all, not 30, just 3. I set max attribute, but it doesn't work. I'm using FBML: . My second problem is that I can't get IDS of users, which has been invited by currently user. I'd like to save to database those invited IDs to use for later. And most strange, third problem, is it possible to disable already invited users within multi-friend-selector dialog, that they can't be invited many times?

I found solution for 3rd problem: exclude_ids. I also found solution (damn mistake) with first - limit (max="3" attribute on multi-friend-selector) problem. At least how can I get submitted/posted/selected IDs of invited users?

2

There are 2 answers

0
Michael de Menten On BEST ANSWER

Using the JS SDK you can use the max_recipients. I don't know why they do not have documented that.

Here is a sample

FB.ui(
{
    method: 'apprequests',
    message: 'My Great Request',
    max_recipients:1
}
    , 
    requestCallback
)
0
evanesis On

Worked on that few months ago, trying to remember...:D

Using the JS SDK, you can set a callback function to the invitation dialog.

In this callback, Facebook gives you the ID of the invitation requests that have been sent : You have to parse it to get the informations you need (ID of invited people, in your case). I'm not using only FBML tags, but it seems that using your fb:multi-friend-selector in a fb:request-form allow you to retrieve the IDs of invited people when posting the form.

About your filtering problem, in the JS SDK, again with the FB.ui function, there's a parameter filters allowing you, for example, to allow your user to invite only non-users, or only "already" users. Is it what you need ?

I don't know if you have the choice to use FBML or not, hope this could help a little at least.