Facebook邀请门-我需要添加什么代码?
我仍然是一个编程高手,所以如果解决方案显而易见,请原谅我 同时,我在FB开发者的网站上找到了这个功能:Facebook邀请门-我需要添加什么代码?,facebook,facebook-graph-api,Facebook,Facebook Graph Api,我仍然是一个编程高手,所以如果解决方案显而易见,请原谅我 同时,我在FB开发者的网站上找到了这个功能: function sendRequestViaMultiFriendSelector() { FB.ui({method: 'apprequests', message: 'My Great Request', redirect_uri: 'http://www.google.com', }, requestCallback); } 并通过调用函
function sendRequestViaMultiFriendSelector() {
FB.ui({method: 'apprequests',
message: 'My Great Request',
redirect_uri: 'http://www.google.com',
}, requestCallback);
}
并通过调用函数使实际窗口弹出
现在我缺少的是如何确保用户确实邀请了某人,如果他确实将他转发到a页,如果没有转发到b页
提前谢谢
-Gerd和Igy为我指明了正确的方向,我基本上找到了我在这里寻找的东西: 因此,对于每个需要类似门的人来说,这将是一个代码:
function sendRequestToManyRecipients() {
FB.ui({method: 'apprequests',
message: 'My Great Request',
}, requestCallback);
}
function requestCallback(response) {
if(response && response.request) {
// Here, requests have been sent, facebook gives you the request and the array of recipients
//console.log(response);
location.href='success.php';
} else {
location.href='cancel.php';
}
希望有帮助
干杯
Gerd您是否查看了该函数返回的内容的文档?你应该能从中找到答案谢谢你指出了正确的方向。