开发者

Facebook list sent invitations

I'm writing a Facebook application that needs to store the UID's of the logged user's friends he's inviting. To clarify:

  • user_a is logged on facebook and using the app;
  • he has the hance to invite some of his friends;
  • the application needs to kn开发者_如何学Cow who are these contacts.

I think I cannot use the standard fb:multi-friend-selector, because there is no way to know who is being invited...

Probably there is a simple solution to this, but I cannot find it :-)

Thanks a lot

Andrea


The currently supported way to do this is to use the Requests dialog

The return data passed to your javascript code when a user sends some requests is (in the request_ids parameter) a comma separated list of the object IDs for the requests which were generated.

You can then take those IDs and request the details from the API either individually, or (preferably) batched - using an App Access token.

You'll receive a response to an API call to https://graph.facebook.com/[REQUEST ID]?access_token=[APP ACCESS TOKEN] which contains the following fields: id, application, created_time, data, from (array of userid and name), to (array of user id and name), message

You can then use those details to update your own app state as needed.

One common use case of this is to stop your user sending requests to the same recipient multiple times, and this is achieved by specifying a value for the exclude_ids parameter of the request dialog next time you show it to that user.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜