Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FB.getLoginStatus(function(response) {
- if (response.status === 'connected') {
- document.write("<h1>Looks like you're logged into Facebook and our app :)</h1> ");
- // 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') {
- document.write("<h1>Logged in but haven't allowed our app</h1> ");
- // the user is logged in to Facebook,
- //but not connected to the app
- } else {
- document.write("<h1>Not logged in</h1>");
- // the user isn't even logged in to Facebook.
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement