React-native-fbsdk: Programatically logout

Created on 22 Jul 2016  路  5Comments  路  Source: facebook/react-native-fbsdk

Hi guys,

How can I do a programatically logout? When I'm logged in, I don't have the LoginButton, so I want to logout by my self. How can I accomplish that?

Most helpful comment

Have you tried LoginManager.logOut()?

All 5 comments

Have you tried LoginManager.logOut()?

I was trying LoginManager.logout()

Thanks :D

LoginManager.logOut() returns undefined is not a function

Use this code on any component to log out -
onLoginFinished={
() => console.log("log in.")
}
onLogoutFinished={() => console.log("logout.")}/>

Calling LoginManager.logOut() does not work, both after and before facebook login.

Was this page helpful?
0 / 5 - 0 ratings