在使用请求对话框向朋友发送邀请后,我需要重定向回我的网站。我使用的代码是
function newInvite(){
var receiverUserIds = FB.ui({
method : 'apprequests',
message: 'Come on man checkout my applications. visit http://ithinkdiff.net',
},
function(receiverUserIds) {
console.log("IDS : " + receiverUserIds.request_ids);
}
);
我正在使用新的php-sdk(3.0).
提前谢谢。
编辑:对不起,我想我误解了。您正试图在此处获取收件人ID,对吗?
虽然您已经说明了PHP SDK,但您的代码使用的是JS SDK。以下是如何在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
});