我嘗試用預先指定的收件人這種方式來彈出對話框:在彈出的打開我有錯誤Facebook發送請求返回錯誤
FB.init({
appId : 'MYAPPID',
status : true,
cookie : true,
xfbml : true,
frictionlessRequests: true
});
function sendRequestToRecipients()
{
FB.ui({method: 'apprequests',
message: 'You have just received a PP request.',
to: '100000526845569'
}, requestCallback);
}
sendRequestToRecipineds();
:An error occurred. Please try later
當我看
我覺得有些信息未發送::我看到下面的彈出窗口的URL請求 api_key, app_id
怎麼回事?有任何想法嗎?
使用Facebook登錄完美。多人選擇器也是。
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : 'MYAPPID', // App ID from the App Dashboard
channelUrl : '//mydomain.com/channel.html', // Channel File for x-domain communication
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true, // parse XFBML tags on this page?
frictionlessRequests: true
});
};
// Load the SDK's source Asynchronously
(function(d, debug){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js";
ref.parentNode.insertBefore(js, ref);
}(document, /*debug*/ false));
function sendRequestToRecipients() {
FB.ui({method: 'apprequests',
message: 'You have just received a PP request.',
to: '100000143396036'
}, requestCallback);
}
function sendRequestViaMultiFriendSelector() {
FB.ui({method: 'apprequests',
message: 'My Great Request'
}, requestCallback);
}
function requestCallback(response) {
// Handle callback here
}
</script>
這是它在這裏
是的,恐怕正是如何它在我的腳本來完成。該問題被隱藏在其他地方.. :( –
我想你打電話'之前FB.init'功能上面的腳本加載SDK js。 – Sahal