Can T Logout Of Facebook

Concern about can t logout of facebook, Android Facebook logout is not working...

Now i am dealing with android Facebook integration.But logout is not dealing with this.without log out from my internet browser in phone i cannot log out from my application.why this taking place?. How can we prevent this?

can t logout of facebook

The great responses

There are 2 independent things going on here:

  1. Whether your user has actually confirmed your app (with authorizations) to Facebook and
  2. Whether your user is visited to Facebook.

Authentication is needed the very first time your user utilizes your app and lasts up until the user clearly de-authenticates (e.g. through the Facebook web Account Settings -> Apps -> App Settings).
great post to read: Facebook Login Account Open
Visit might be needed each time your user begins your app. However if you utilize the default SDK license(), that attempts to do a Single Indication On (SSO), where if the Facebook app is visited, your app is immediately visited and utilizes the existing gain access to token.

If you are utilizing SSO, when you do a logout, that has no result, as a genuine log out would need to log out the Facebook app - which the user may not like!

You can navigate this habits by doing a license of the type
authorize(this, PERMISSIONS, FORCE_DIALOG_AUTH, new LoginDialogListener());
which prevents SSO and requires a dialog login. Naturally, that then requires your user to login each time you begin your app - unless you conserve the login information/ gain access to token under the covers (which is exactly what the SDK does - inspect the source).

EDITED:

 m_facebook.authorize(FacebookActivity.this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH,
            new LoginDialogListener());
 class LoginDialogListener implements DialogListener
{
    public void onComplete(Bundle p_values)
    {
        saveCredentials(m_facebook);
        if (m_messageToPost != null)
        {
            postToWall(m_messageToPost);
        }
    }      
    public void onFacebookError(FacebookError p_error)
    {
        finish();
    }      
    public void onError(DialogError p_error)
    {
        finish();
    }      
    public void onCancel()
    {
        finish();
    }
}
Such a short article about can t logout of facebook. Hopefully this article can help you. Good luck!

Advertisement