0
私のFacebookブックのマルチフレンドセレクタダイアログで "Send Request"を押すと、次のエラーが表示されます。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)を介してアプリケーションの要求を送信しようとする私を促しました。それは問題を解決しませんでした。
注:127.0.0.1 myapp.comを/ etc/hostsに追加しましたが、このエラーが発生しますか?
FB.init({
appId: 'YOUR_APP_ID', // App ID
channelUrl: '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true // parse XFBML
});
:あなたはJavaScriptをSDK documentationを見れば
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() {
}