title: How to detect user logging out of Facebook after logging into my app?
body: <p>My application uses Facebook authentication:</p>
  
  <pre><code>FB.init({
  
      appId: config.fbAppId,
      status: true,
      cookie: true,
  //  xfbml: true,
  //  channelURL : 'http://WWW.MYDOMAIN.COM/channel.html', // TODO
      oauth  : true
  
  });
  
  // later...
  
  FB.login(function(response)
  {
      console.log(response);
      console.log("authId: " + response.authResponse.userID);
      gameSwf.setLoginFacebook(response.authResponse.accessToken);
  }, {scope:'email,publish_actions,read_friendlists'});
  </code></pre>
  
  <p>And when using it, people can post to their wall:</p>
  
  <pre><code>var obj = {
        method: 'feed',
        link: linkUrl,
        picture: pictureUrl,
        name: title,
        caption: "",
        description: message
      };
  
      function callback(response) {
        // console.log("Post on wall: " + response);
      }
  
      FB.ui(obj, callback);
  </code></pre>
  
  <p>This works fine, but there is one little hickup. If people:</p>
  
  <ol>
  <li>Log in on the app.</li>
  <li>Log out of Facebook.</li>
  <li>Attempt to make a wall post from the app.</li>
  </ol>
  
  <p>The opening of the wall post dialog fails. The console says "<em>Refused to display document because display forbidden by X-Frame-Options.</em>".</p>
  
  <p>Can I instead get Facebook to show a login prompt to the user. Or can I detect the error and tell the user that he's no longer logged in on Facebook?</p>