Skip to content

Instantly share code, notes, and snippets.

@klochner
Created August 19, 2010 00:38
Show Gist options
  • Save klochner/536665 to your computer and use it in GitHub Desktop.
Save klochner/536665 to your computer and use it in GitHub Desktop.
FB.init({
appId : 'YOUR_APP_ID',
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) {
if (response.session) {
// logged in and connected user, someone you know
} else {
window.setInterval(FB.getLoginStatus,1000);
FB.Event.subscribe('auth.login', function(response) {
location.reload(true);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment