开发者

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

开发者 https://www.devze.com 2023-04-12 16:19 出处:网络
I\'m stuck on these three things. Firstl开发者_如何学Cy, 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,

I'm stuck on these three things. Firstl开发者_如何学Cy, 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?


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
)


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

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

  • https://developers.facebook.com/docs/reference/dialogs/requests/

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.

  • http://developers.facebook.com/docs/reference/fbml/request-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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号