这是我用来加载SDK的代码:
window.fbAsyncInit = function() {
FB.init({
appId : "<APP_ID>",
status : true,
cookie : true,
xfbml : true
});
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
当用户点击邀请按钮时调用此方法:
function inviteFriends(){
FB.ui(
{
method: 'apprequests',
message: 'invites you to play'
},
function(response){ console.log(response) } // temporary to verify
)
}
用户体验如https://developers.facebook.com/docs/concepts/requests/#ux中所述,但当接收者登录时,Facebook加载后通知消失。
寻找答案,我发现了这些:
Notification for facebook app requests not showing up
http://facebook.stackoverflow.com/questions/9689927/ios-fb-request-dialogs-not-working-properly
http://facebook.stackoverflow.com/questions/10209281/handle-facebook-apprequest-notification
可是:
我错过了什么?
答案 0 :(得分:0)
https://developers.facebook.com/bugs/532388000129311
测试显然已经结束了,事情应该很快恢复正常,至少目前是这样。
答案 1 :(得分:0)
当您的画布应用未正确设置时,仍会发生这种情况。请参阅答案: