title: Can't get login status with FB.getLoginStatus
body: <p>I can't get this to work, and I have tried every solution that I have found online. Can someone please look into it and let me know what I am doing wrong.</p>
  
  <pre><code>$(document).ready(function(){
        window.fbAsyncInit = function() {
             FB.init({
                  appId: 'xxxxxxx',
                  cookie: true,
                  xfbml: true,
                  oauth: true
             });
             FB.Event.subscribe('auth.login', function(response) {
                  window.location.reload();
             });
             FB.Event.subscribe('auth.logout', function(response) {
                  window.location.reload();
             });
        };
        (function() {
             var e = document.createElement('script'); e.async = true;
             e.src = document.location.protocol +
             '//connect.facebook.net/en_US/all.js';
             document.getElementById('fb-root').appendChild(e);
        }());
  
        $("#fb_login_status_check").click(function(){
             FB.getLoginStatus(function(response) {
                             console.log(response);
                  if (response.status === 'connected') {
                       // the user is logged in and has authenticated your
                       // app, and response.authResponse supplies
                       // the user's ID, a valid access token, a signed
                       // request, and the time the access token 
                       // and signed request each expire
                       var uid = response.authResponse.userID;
                       var accessToken = response.authResponse.accessToken;
                       console.log('User logged in and autenticated');
                    } else if (response.status === 'not_authorized') {
                       // the user is logged in to Facebook, 
                       // but has not authenticated your app
                       console.log('User logged in, but not autorized');
                    } else {
                       // the user isn't logged in to Facebook.
                       console.log('User not logged in');
                    }
             }, true);
  
  
        })
  
        $("#fb_logout_button").click(function() {
             if(FB.logout(function(response) {
                  console.log('User logout.');
             })){
                  console.log('User  logout.');
             }else{
             console.log('User didnt logout.');
             }
        });
  
        $("#fb_login_button").click(function() {
             FB.login(function(response) {
                  if (response.authResponse) {
                       console.log('Welcome!  Fetching your information.... ');
                       FB.api('/me', function(response) {
                       console.log('Good to see you, ' + response.name + '.');
                       });
                  }else{
                       console.log('User cancelled login or did not fully authorize.');
                  }
             }, 
             { 
                  scope: 'email,user_likes'
             }); 
        });
  
  
        });
  </code></pre>
  
  <p>Response that I am getting after function is called is</p>
  
  <pre><code>authResponse null
  status "unknown"
  </code></pre>
  
  <p>User is logged in, and I can get all information using php sdk. Please help, I am trying to make this work for the last 2 days...</p>