0

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 ");


        }
    }
};
user848007
  • 23
  • 6
  • No, your app's FB session and the Facebook App's FB session are completely independent, and there's no way to see if the user has logged out of the FB app. – Ming Li May 21 '14 at 17:27
  • @MingLi I am having same problem and after user Logged out from its native app then if he press on Logout button it showing `Invalid context argument` error . I have posted the same [here](http://stackoverflow.com/questions/25376507/how-my-app-can-know-when-user-logout-from-its-android-native-facebook-app/25458510#25458510), please have a look at it . – Kunu Aug 23 '14 at 05:01

0 Answers0