FB.getLoginStatus is not firing even the sandbox settings are off
===

<p>I'm using the Facebook API in order to check if the user who visits my page is logged into Facebook or not. I tried everything, couldn't came up with a solution. I would like to especially state that <b>sandbox mode is off</b>. And my code is right below;</p>

    <div id="fb-root"></div>
    	<script>
    
    	function fbLoginStatus(response) {
    		console.log("Status: "+response.session);
    		 if(response.session) {
    			//user is logged in, display profile div
    			alert("Logged in");
    		 } else {
    			//user is not logged in, display guest div
    			alert("Not logged in");
    		 }
     	 }
    	  window.fbAsyncInit = function() {
    		FB.init({
    		  appId      : '111111111111111',  // Channel File
    		  status     : true, // check login status
    		  cookie     : true, // enable cookies to allow the server to access the session
    		  xfbml      : true  // parse XFBML
    		});
    		FB.getLoginStatus(function(response){
    			console.log("Hey");
    			if(response.session){
    				console.log("You are logged in");
    			}
    			else{
    				console.log("You are not logged in");
    			}
    		});
    		// Additional initialization code here
    	  };
    	  // Load the 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 = "http://connect.facebook.net/en_US/all.js";
    		  ref.parentNode.insertBefore(js, ref);
    		}(document));
    	   
    	</script>