|
|
@ -11,13 +11,11 @@ function statusChangeCallback(response) { |
|
|
testAPI(); |
|
|
testAPI(); |
|
|
} else if (response.status === 'not_authorized') { |
|
|
} else if (response.status === 'not_authorized') { |
|
|
// The person is logged into Facebook, but not your app.
|
|
|
// The person is logged into Facebook, but not your app.
|
|
|
document.getElementById('status').innerHTML = 'Please log ' + |
|
|
|
|
|
'into this app.'; |
|
|
|
|
|
|
|
|
$('#status').html('Please log into this app.'); |
|
|
} else { |
|
|
} else { |
|
|
// The person is not logged into Facebook, so we're not sure if
|
|
|
// The person is not logged into Facebook, so we're not sure if
|
|
|
// they are logged into this app or not.
|
|
|
// they are logged into this app or not.
|
|
|
document.getElementById('status').innerHTML = 'Please log ' + |
|
|
|
|
|
'into Facebook.'; |
|
|
|
|
|
|
|
|
$('#status').html('Please log into Facebook.'; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -72,8 +70,8 @@ function testAPI() { |
|
|
console.log('Welcome! Fetching your information.... '); |
|
|
console.log('Welcome! Fetching your information.... '); |
|
|
FB.api('/me', function(response) { |
|
|
FB.api('/me', function(response) { |
|
|
console.log('Successful login for: ' + response.name); |
|
|
console.log('Successful login for: ' + response.name); |
|
|
document.getElementById('status').innerHTML = |
|
|
|
|
|
'Thanks for logging in, ' + response.name + '!'; |
|
|
|
|
|
|
|
|
$('#status').html( |
|
|
|
|
|
'Thanks for logging in, ' + response.name + '!'); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|