title: Facebook App: Javascript SDK getLoginStatus not working in canvas
body: <p>I have been racking my brain for 2 days now. I am trying to build a simple Facebook app using the Javascript SDK and I just want a simple alert if the user is not authorized using getLoginStatus(). It works fine in my website but not in the canvas. I get no alert. I am using very simple code that Facebook provides.</p>
  
  <pre><code>&lt;div id="fb-root"&gt;&lt;/div&gt;
  &lt;script&gt;
  window.fbAsyncInit = function() {
  // init the FB JS SDK
  FB.init({
    appId      : '354932757968708',         // App ID from the app dashboard
    channelUrl : '//www.staging.socialdigi.com/channel.html', // Channel file 
    status     : true,                                 // Check Facebook Login status
    xfbml      : true                                  // Look for social plugins
  });
  
  FB.getLoginStatus(function(response) {
  if (response.status === 'connected') {
    alert("Youre In");
    var uid = response.authResponse.userID;
    var accessToken = response.authResponse.accessToken;
  } else if (response.status === 'not_authorized') {
    alert("Not Authorized");
  } else {
    // the user isn't logged in to Facebook.
  }
  });
  };
  
  // Load the SDK asynchronously
  (function(d, s, id){
   var js, fjs = d.getElementsByTagName(s)[0];
   if (d.getElementById(id)) {return;}
   js = d.createElement(s); js.id = id;
   js.src = "//connect.facebook.net/en_US/all.js";
   fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
  &lt;/script&gt;
  </code></pre>
  
  <p>I get the following errors in the console but have been told it doesnt have anything to do with my issue</p>
  
  <p><strong>Blocked a frame with origin "<a href="http://static.ak.facebook.com" rel="nofollow">http://static.ak.facebook.com</a>" from accessing a frame with origin "<a href="http://staging.socialdigi.com" rel="nofollow">http://staging.socialdigi.com</a>". The frame requesting access set "document.domain" to "facebook.com", but the frame being accessed did not. Both must set "document.domain" to the same value to allow access.</strong> </p>
  
  <p>I do not have an ssl
  Its in sandbox mode
  I have the canvas url correct and nothing for secure canvas url
  app id is correct</p>
  
  <p>any help is appriciated
  thanks</p>