I am working with an IOS PhoneGap application. I integrated the app with FB and I successfully logged in.
I use the following code for the login:
function login() {
FB.login(
function(response) {
if (response.session) {
console.log('logged in');
} else {
console.log('not logged in');
FB.getLoginStatus(function(response) {
if (response.status == 'connected') {
alert("user logged");
}
else {
console.log('not logged in get loginstatus');
}
});
}
},
{ scope: "email" }
);
}
My problem is that I am not able to log the user out from my application and from the FB. The logout function is not logging the user out.
I am using the following code :
function facebooklogout() {
FB.logout(function (response) {
alert("logged out");
});
}
How can I fix this problem?
Thanks...