开发者

Facebook 'apprequests' method and Requests Dialog

I need to redirect back to my website after sending the invitation to friends using Requests Dialog.The code that I used is

function newInvite(){
             var receiverUserIds = FB.ui({ 
                    method : 'apprequests',
                    message: 'Come on man checkout my application开发者_StackOverflow中文版s. visit http://ithinkdiff.net',
             },
             function(receiverUserIds) {
                      console.log("IDS : " + receiverUserIds.request_ids);
                    }
             );

I am using new php sdk(3.0).

Thanks in advance.


Edit: I am sorry, I think I misunderstood. You are trying to catch recipient IDs here right?


Though you have stated PHP SDK, but your code is using JS SDK. Here is how you can do it in JS:

FB.ui({
    method:'apprequests',
    message:'I want you to try this app',
    // to:123456798, // for sending to specific users
    // filters:['app_non_users'], // commented: let users send notifications to app users too, probably a good idea to make them revisit?
    data:'' // send data what you would like to track, FB will send that back in the URL for us
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜