开发者

Facebook canvas app - delete invite after accept

I'm writing a Facebook iframe/canvas app on fanpage as a new tab and given the ability to users to invite friends. However when their friends accepted the invitation, the invitation doesn't delete and still exist in the applications request.

As far as I know we need to get from$_REQUEST["request_ids"] but things happen when users accept the invitation, it went to the apps before redirect to fanpage. So suppose $_REQUEST["request_ids"] shown in the apps but once it redirect, the $_REQUEST["request_ids"] gone !

What should I do开发者_StackOverflow社区 ?


there are 2 (or more) ways to do what u want: - deleting the app request before doing the redirect - append the request_ids field in the redirect url


For the first part of the Question, you have to manually delete the app request similar to below:

$facebook->api('/'.$requistid.'?access_token='.$access_token,'DELETE');

$requistid is the request id you need to delete.

You can get all the app requests by doin this graph api call:

$facebook->api('/me/apprequests?fields=id,from&access_token='.$access_token);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜