Firebase facebook button android authentication when logging out

I use firebase in my Android application and facebook SDK to login. The only problem I encountered is that when I log in using facebook and then log out, the facebook login button is in the “log out” state, and when I click on it, it asks whether I want to log out.

as shown

ScreenShot Problem

What am I doing to logout:

FirebaseAuth.getInstance().signOut() 

So, this, obviously, only clears my firebase session, but does not disconnect my application using facebook, what should I do?

+7
android firebase facebook-authentication
source share
1 answer

You must also exit the Facebook SDK using the LoginManager class (com.facebook.login.LoginManager).

These two lines work for me:

 FirebaseAuth.getInstance().signOut(); LoginManager.getInstance().logOut(); 

Hope this helps :)

+16
source share

All Articles