I'm building a Phonegap app, and am using the Facebook Javascript API to log users in. My code is as follows:
FB.login(function(response) {
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function(response) {
console.log('Good to see you, ' + response.name + '.');
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
});
Sure, this works fine for logging users in, but how can I KEEP them logged in, even after the app is closed?