8

I'm using firebase in my android app and facebook SDK for logging-in as well. The only problem I'm facing is that when I log-in with facebook, then log-out, the facebook login button is in the "log-out" state and when I click it, it asks if I want to log-out.

like shown

Problem ScreenShot

What I do to log-out:

FirebaseAuth.getInstance().signOut()

so, this obviously only clears my session on firebase but doesn't disconnect my app with facebook, what to do?

r3dm4n
  • 1,175
  • 2
  • 18
  • 33
Ahmed Ashraf
  • 2,795
  • 16
  • 25

1 Answers1

23

You have to log out from the Facebook SDK too, using the LoginManager class (com.facebook.login.LoginManager).

These two lines work for me:

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

Hope this helps :)

good-engineer
  • 250
  • 2
  • 8