私のサイトには、次のようなログアウト ページがあります。
<div id="fb-root"></div>
<script>
// Load the Facebook 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));
// Init the SDK upon load
window.fbAsyncInit = function() {
FB.init({
appId : '[valid_app_id]' // App ID
});
FB.getLoginStatus(function(loginResponse){
// As soon as we get the login status... log out!
FB.logout(function(logoutResponse) {
// logged out!
});
});
}
</script>
通常の Chrome ブラウザからアクセスすると、このページは完全に機能します。ただし、
[x]Block third-party cookies and site data
オプションが chrome の「コンテンツ設定...」の下でチェックされている場合、ページはユーザーのログアウトに失敗し、レポートします。
FB.logout() called without an access token.
この問題の回避策はありますか? 通常よりも厳しいセキュリティ設定をしている場合でも、ユーザーをログアウトできるようにしたいと考えています。