How to disable Single SIgn On for facebook android app?

12,602

See setLoginBehavior in the OpenRequest that you pass to Session.openFor[Read|Publish] - https://developers.facebook.com/docs/reference/android/3.0/Session.OpenRequest#setLoginBehavior%28SessionLoginBehavior%29

You can set it to SUPPRESS_SSO which will use the web dialog instead of SSO - https://developers.facebook.com/docs/reference/android/3.0/SessionLoginBehavior#SUPPRESS_SSO

Share:
12,602
banskt
Author by

banskt

I am a computational biologist. I use Bayesian methods to solve problems in genetics. I did my PhD in physics / statistical mechanics. Between research and family, I develop websites, android apps and design logos.

Updated on June 14, 2022

Comments

  • banskt
    banskt almost 2 years

    I am building an application which needs user credentials for multiple users. If SSO is enabled, then I cannot logout the user (provided Facebook app is installed on the device) after using our application. The session persists, and the only method for logging out the user is via the facebook app, before the next user can login to our application.

    So, I need the SSO disabled, so that it is independent of the facebook app on the device.

    I have seen the problem being queried here: Disabling and Enabling Single Sign On in Facebook as Required

    I know that in SDK 2.0, it could have been done using FORCE_DIALOG_AUTH, but in SDK 3.*, how do I go about it? http://developers.facebook.com/docs/tutorials/androidsdk/3.0/upgrading-from-2.0-to-3.0/

    P.S.: Any other method of making the login and logout independent of the facebook app will also work