Is there a ideal way to Logout User from Android App if user logs out on the Facebook website?. The native Facebook android app does not appear to handle this scenario either.
I am basically trying to log out user from inside android app if user logs out from the actual Facebook website
I am using the following logic inside my android app:
private Session.StatusCallback statusCallback = new Session.StatusCallback() {
@Override
public void call(Session session, SessionState state,
Exception exception) {
if (state.isOpened()) {
buttonsEnabled(true);
Log.d("FacebookActivity", "Facebook session opened:Logged in: " + "Access Token: +
session.getAccessToken() + "App Id: " + session.getApplicationId());
} else if (state.isClosed()) {
buttonsEnabled(false);
Log.d("FacebookActivity", "Facebook session closed: Logged out ");
}
}
};