Reputation: 2144
I'm developing an Ionic app that has Google and Facebook auth, (using Firebase). For Android, I have both working. For iOS, Facebook is not working. Here's a screenshot:
and in case you ask, yes, my app is live (and contact email set in settings):
I have also added an "iOS" app in the Facebook developer console:
And as far as Firebase is concerned, I added the Facebook app informatino into my config.xml
:
ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="<app_id_here>" --variable APP_NAME="<my-app-name>"
I've done everything humanly possible, and Facebook should be working on iOS, but it's not. Once again, it does work properly on Android, but I had to add in "key hashes" to the Facebook developer console for it to work, depending on how I signed my app. But for iOS, I have no clue how their apps work and there's no box to put a hash for iOS in the Facebook dev console, so I'm not sure what else I can do.
UPDATE (Solved)
So, when using the Ionic platform using Firebase authentication, there's an additional step needed for Facebook auth to work on iOS, and that's adding the plugin for the "in app browser". The command is below. After removing the 'iOS' platform and running this command, then rebuilding it, Facebook auth on iOS now works.
ionic plugin add cordova-plugin-inappbrowser --save
Upvotes: 1
Views: 717
Reputation: 11
It occurs because you logged in this browser with fb account that has no permissions. you should log out from your browser first and try again with an admin account of your facebook app.
Upvotes: 0
Reputation: 8271
Did you try to add the Contact E-mail
as follows :
You will need to add a contact email for the Facebook App . Select Settings
in the left sidebar and provide a valid contact email address.
and from the Description of your Plugin it stated in one of the issue is :
cordova plugin add cordova-plugin-facebook4 will install the latest version from npm, not the latest version from this repository.
To achieve that last goal, you need to call cordova add with a github url
cordova plugin add https://github.com/jeduan/cordova-plugin-facebook4
Update:
After a long discussion after installing In-app
Browser plugin made it to work on iOS
ionic plugin add cordova-plugin-inappbrowser --save
Upvotes: 2