Firebase facebook button android authentication when logged out

久未见 提交于 2019-12-23 08:49:30

问题


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?


回答1:


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 :)



来源:https://stackoverflow.com/questions/38542661/firebase-facebook-button-android-authentication-when-logged-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!