FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
document.write("Looks like you're logged into Facebook and our app :)");
// the user is logged in and connected to 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;
} else if (response.status === 'not_authorized') {
<div class="overlay"><div class="overlay-content"></div></div>
// the user is logged in to Facebook,
//but not connected to the app
} else {
<div class="overlay"><div class="overlay-content"></div></div>
// the user isn't even logged in to Facebook.
}
});
</script>