Ionic 1 + Facebook ( Always getting connected status on iOS)


I am looking to integrate facebook native authentication to my Ionic app but always can’t get it to work.
I am using the phonegap facebook plugin, which work fine on browser but not on iOs.
When I run my app on iOS device, the facebookConnectPlugin.getLoginStatus function always getting ‘connected’ status even when facebook is deconnected or uninstalled on the phone.
Can you please help me with this ?

My system configuration :

Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.5
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v4.2.2
Xcode version: Xcode 7.2.1 Build version 7C1002

If the native application isn’t available it will use a browser based authentication, you’re probably getting “connected” returned because that is the status. Have you tried calling the logout method on the API and then trying again?

Thank you for your reply,
Actually, the plugin works fine on browser, which means when am connected on facebook it gets connected status and the actual user, when I am deconnected from facebook, it gets unknown status which is fine.
On iOS device, even when I am deconnected from facebook, it gets connected status and old user info.
I actually tried to logout but got the error >> Refused to display ‘’ in a frame because it set ‘X-Frame-Options’ to ‘DENY’ << on browser.
Its a time that I am trying to have a native facebook authentication in my app but no progress
Please can you help with this ?

1 Like