0
我在我的Facebook多朋友選擇器對話框上按「發送請求」時出現以下錯誤。Facebook多朋友選擇器對話框失敗?
Unsafe JavaScript attempt to access frame with URL https://s-static.ak.fbcdn.net/connect/xd_proxy.php#cb=f13538d5d4&origin=http%3A%2F%2Fjoincrowdy.com%2Ff3b62245cc&relation=opener&transport=postmessage&frame=f145be71f&result=%7B%22request%22%3A%22271624056256532%22%2C%22to%22%3A[%22122614229%22]%2C%22updated_frictionless%22%3Afalse%7D from frame with URL http://MYAPP.com/rooms/1. Domains, protocols and ports must match.
我本來正在制定關於myapp.com:3000但這個錯誤促使我嘗試通過生產模式(80端口)發送應用程序的請求。這並沒有解決問題。
注意:我在我的/ etc/hosts中添加了127.0.0.1 myapp.com是否會導致此錯誤?
這是我的代碼:
function initFb() {
window.fbAsyncInit = function() {
FB.init({
appId : user.fbAppId,
frictionlessRequests: true,
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
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.js";
ref.parentNode.insertBefore(js, ref);
}(document));
}
function attachInviteButton() {
$("#invite").click(sendRequestViaMultiFriendSelector);
}
function sendRequestViaMultiFriendSelector() {
FB.ui({
method: 'apprequests',
message: 'Invite your friends to play now.',
}, requestCallback);
}
function requestCallback() {
}