Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     if (response.status === 'connected') {
  2.               // Logged into your app and Facebook.
  3.               document.getElementById("status").innerHTML = "<p>User ID: " +response.first_name + "</p>";
  4.              
  5.              
  6.             $.post("fb_post.php",
  7.             {
  8.               fbid:response.authResponse.userID,
  9.               fbfn:response.first_name,
  10.               fbln:response.last_name,
  11.              
  12.             },
  13.              function(data,status){
  14.                   // alert pops up once response from server received
  15.                   alert("Data: " + data + "\nStatus: " + status);
  16.             });
  17.          
  18.                
  19.                
  20.              // testAPI();
  21.             } else if (response.status === 'not_authorized') {
  22.               // The person is logged into Facebook, but not your app.
  23.               document.getElementById('status').innerHTML = 'Please log ' +
  24.                 'into this app to create/edit your own webfolio!';
  25.             } else {
  26.               // The person is not logged into Facebook, so we're not sure if
  27.               // they are logged into this app or not.
  28.               document.getElementById('status').innerHTML = 'Please log ' +
  29.                 'in to create your own webfolio!';
  30.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement