facebook-android-sdk: Force reauthentication using the sdk 3.0.1

1.2k Views Asked by At

Is there a way to trigger a reauthentication dialog using the facebook-android-sdk 3.0.1? It is possible using the JavaScript SDK (see https://developers.facebook.com/docs/facebook-login/reauthentication/), but I haven't found anything for the Android SDK.

The dialog should be triggered when the user wants to enter the "Edit my profile" section of the app.

1

There are 1 best solutions below

4
5agado On

I used something like this

Session session = Session.getActiveSession();
        if (session != null){
            session.closeAndClearTokenInformation();
            session = null;
            Log.i(TAG, "cleared session");
            Session.openActiveSession(activity, true, sessionCallback);
        }