I have a logout page on my site, which looks something like this:
<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>
The page functions perfectly well when accessed from a vanilla Chrome browser. However, if the
[x]Block third-party cookies and site data
option is checked under "Content settings..." for chrome, the page fails to logout users, and reports
FB.logout() called without an access token.
Is there a workaround to this problem? I'd like to be able to log users out, even when they have stricter-than-usual security settings.