I'm not sure, but maybe the following code will help you.
At boot time, the application will simply execute this script or js function as:
logout: function() {
FB.getLoginStatus(function(response) {
if(response.session) {
FB.logout(function(response) {
return;
});
}
});
}
Facebook, . , FB.logout(), Facebook.
, , , .