Reputation: 288
I am using https://github.com/Wizcorp/phonegap-facebook-plugin
for facebook login in my cordova based android app. I was testing the app with Facebook login feature, after a certain no of log in, i started getting an error saying
{"errorMessage":"Facebook error: Session was closed and was not closed normally"}.
The app is actually connecting to facebook app, But i get an error response. Totally lost. Where am i going wrong
Upvotes: 3
Views: 1768
Reputation: 1044
Ensure you call to logout otherwise the session will expire..
facebookConnectPlugin.logout(function (response) {
alert(JSON.stringify(response));
}, function (response) { alert(JSON.stringify(response)) });
otherwise use long-lived facebook token since this is due to session expiring
Upvotes: 1
Reputation: 288
I found the solution. May help someone so sharing it. I did not create an Android platform for Facebook App. Add android Platform in Facebook App. Do not forget to mention the Key hash, this wont work without key hash.
Upvotes: 3