0

I'm using Cordova latest version with this plugin https://github.com/jeduan/cordova-plugin-facebook4... In the first version, I was getting permission for only:

id,email,birthday

And in the 2nd version, I am getting permission for:

id,email,birthday,gender,first_name,last_name

which causes the following error:

domain=com.facebook.sdk.login code=304

But if I removed the app and re-installed it, it works fine!

So, what should I do now? the app in production, and all users can't login, and it is really hard to ask all users to remove the app and re-install it! any idea to release another version with a patch to fix this issue?

I think there is a solution here: ios facebook sdk 4.0 login error code 304, but I'm not a good Objective C developer to know how to implement it in the plugin!

Community
  • 1
  • 1
Mahmoud M. Abdel-Fattah
  • 1,479
  • 2
  • 16
  • 34

2 Answers2

0

The issue is because the cordova facebook plugin call facebookConnectPlugin.getLoginStatus() caches the FB response. It doesn't allow us to force a server trip in that call (whereas in the FB Javascript SDK it does).

I resolve the issue by calling facebookConnectPlugin.login() when I get 304. That forces a server trip to reload the FB permission upon a fresh login.

Edmond Chui
  • 660
  • 9
  • 6