My app has facebook login integration in it, And i found one issue while re-login, When i tried to logout from facebook and after that re-login i am getting previous user auto login in my app but what i need is to login as new user. Don't Know what's Going wrong
My Logout code is
val parameters = Bundle()
val request = GraphRequest(
AccessToken.getCurrentAccessToken(),
"/me/permissions/",
parameters,
HttpMethod.DELETE,
GraphRequest.Callback {
// Insert your code here
LoginManager.getInstance().logOut()
})
request.executeAsync()
You need to initialize the FacebookSdk in the logout activity before calling logOut().
LoginManager.getInstance().logOut();,will work
but dont forgot to put FacebookSdk.sdkInitialize(getApplicationContext()); inside your LogoutActivity onCreate
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With