Created
August 15, 2011 20:25
-
-
Save mitchellhislop/1147752 to your computer and use it in GitHub Desktop.
Detect if someone is logged into FB, and the different states
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FB.getLoginStatus(function(response) { | |
if(response.session) { | |
fbCheckUserPerms(); //show the FB login | |
} else { | |
// no user session available, someone you dont know | |
if(response.status == "notConnected") { | |
// But user is logged into facebook | |
alert("But is logged In"); //show the FB login | |
} else { | |
// show the default login | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment