Created
January 4, 2011 10:50
-
-
Save julienXX/764642 to your computer and use it in GitHub Desktop.
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
window.fbAsyncInit = function () { | |
FB.init({ appId: #{APP_ID}, status: true, cookie: true, xfbml: true }); | |
/* All the events registered */ | |
FB.Event.subscribe('auth.login', function (response) { | |
// do something with response | |
alert("login success"); | |
}); | |
FB.Event.subscribe('auth.logout', function (response) { | |
// do something with response | |
alert("logout success"); | |
}); | |
FB.getLoginStatus(function (response) { | |
if (response.session) { | |
// logged in and connected user, someone you know | |
alert("login success"); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment