Search code examples
androidfacebook-android-sdk

Change Facebook Login button from Logout to Login?


After user logins via facebook, the button will change from "Login" to "Logout", is there any way pro grammatically change back to "Login" status?


Solution

  • You have to be logged out to show LoginButton again, otherwise you can't see LoginButton. If you want to logout pro grammatically, you can do it like,

    public void logOut() {
        loginButton.performClick();
    }
    

    and call this method where you want to show LoginButton again.