Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (response.status === 'connected') {
- // Logged into your app and Facebook.
- document.getElementById("status").innerHTML = "<p>User ID: " +response.first_name + "</p>";
- $.post("fb_post.php",
- {
- fbid:response.authResponse.userID,
- fbfn:response.first_name,
- fbln:response.last_name,
- },
- function(data,status){
- // alert pops up once response from server received
- alert("Data: " + data + "\nStatus: " + status);
- });
- // testAPI();
- } else if (response.status === 'not_authorized') {
- // The person is logged into Facebook, but not your app.
- document.getElementById('status').innerHTML = 'Please log ' +
- 'into this app to create/edit your own webfolio!';
- } else {
- // The person is not logged into Facebook, so we're not sure if
- // they are logged into this app or not.
- document.getElementById('status').innerHTML = 'Please log ' +
- 'in to create your own webfolio!';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement