I am building an iphone app with phonegap, and using the facebook javascript sdk.
FB.getLoginStatus(function(response){
if(response.status === 'connected'){
alert("connected");
var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
}
else if(response.status === 'not_authorized'){
login();
}
else{
login();
}
});
This function checks the status. But it alerts "connected" even i am not logged in to facebook with the xcode iphone simulator.