Facebook ログイン システムを自分の Web サイトに実装しようとしています。
Facebook に接続しようとすると、コンソール ログから次のエラーが表示されます。
Unsafe JavaScript attempt to access frame with URL https://s-static.ak.fbcdn.net/connect/xd_proxy.php?xxxxxxxxxxxxxxxx
JavaScript SDK を使用しています
body
これをタグに追加しました:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'xxxxxxxxxxxxxx',
status : true,
cookie : true,
xfbml : true
});
};
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
Facebook ログインボタン:
<div class="fb-login-button" data-perms="email">Login with Facebook</div>
私はローカルホストからテストしています - Facebook 開発アプリ (サイト URL: http://localhost
)にウェブサイトを登録しました。
この問題を解決するにはどうすればよいですか? または、PHP SDK を使用する必要がありますか?
編集:パブリックドメインでサーバーにアップロードしたときと同じ問題。