FB.login(function(response) {
// handle the response
}, {scope: 'public_profile,email'});
FB.login(function(response) {
if (response.status === 'connected') {
// Logged into your webpage and Facebook.
} else {
// The person is not logged into your webpage or we are unable to tell.
}
});
FB.logout(function(response) {
// Person is now logged out
});