Skip to content

Instantly share code, notes, and snippets.

@mitchellhislop
Created August 15, 2011 20:25
Show Gist options
  • Save mitchellhislop/1147752 to your computer and use it in GitHub Desktop.
Save mitchellhislop/1147752 to your computer and use it in GitHub Desktop.
Detect if someone is logged into FB, and the different states
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