Facebook clean log-out and log-in with a different user

I finally succeeded after days of working on the integration of Facebook and Cordova.
Basically we have 3 options:

  1. The official plugin: Phonegap-Facebook-Plugin and ngCordova
  2. The latest OpenFB on GitHub (openfb.js)
  3. The outdated OpenFB in the sample app Sociogram (openfb-angular.js)

The first two options have the same problem: log-out is not clean in iOS. A second log-in will log in automatically without typing credentials, meaning that you can’t log in as a different user.

Option 3 is the one actually worked for me, but the version on the author’s repo is outdated. I did a bunch of fixes in my fork:

The most important part is that It does not have the log-out problem, and I successfully tested it in my app on browser, iOS and Android simulators.

The drawback is that it does not have the awesome native Facebook dialog. A walkaround is to DIY one and use POST in the Facebook Graph API (OpenFB.post(’/me/feed’… )

Hope this will save you some time! :slight_smile:


Now i am facing problem with openFb in lastest android version? opened popup is blank, no errors in console.

Can u help to get out of this issue?