To enable the Facebook login, you must declare your app to Facebook.
If you are not declared as a developer on Facebook, you have to follow the steps to sign up (it's easy and free). You will find everything you need in this online help: How to register as a developer on Facebook
If you do not follow the full procedure, you will not be able to connect your App to Facebook.
In the explanation of the process, I will use the Apollo Apps News app as an example. Make sure you fill in the correct information for YOUR app.
1. Authenticate yourself through your personal FB account
Authenticate yourself through your personal FB account, then go to this URL:
Click Add a new App.
2. Fill in the fields in the iBox:
- "Display Name": This is the name of your application. It is recommended to include the name of your app.
- "Contact Email": Add you email
- "Category": Choose a category in the dropdown menu.
Click "Create App ID". Go through the security check, then click "Submit".
3. Click "Settings" in the left column
Click +Add a platform
We are going to repeat the operation 3 times: once for the platform "Website", once for "iOS" and finally, once for "Android"
4. Add the platform "Website"
In the field "Site URL", enter the URL of your Apollo Apps backend, like this: "http://[YOURAPP].apollochurchapps.com".
Don't forget to click "Save changes".
Attention: If you install a domain name for your web app, you have to come back here to edit the field "Site URL".
5. Add the platform "iOS"
In the field "Bundle ID", enter the Bundle ID of your app. You can find it by going to Users > My users > Settings in your Apollo Apps backend.
Also enable "Single Sign-On", and don't forget to click "Save changes".
Attention: If for any reason, the Bundle ID in your Apollo Apps backend is wrong, you must enter the correct one in the field "Bundle ID". This can be the case if, for example, your app is an update of an existing app not created with Apollo Apps.
In this case, the easiest way is to follow the compilation process of your app, and then consult the menu Users > My users > Settings in the Apollo Apps backend, it will be updated with the correct information.
6. Add the platform "Android"
You can find the information by going to Users > My users > Settings in your Apollo Apps backend.
In the field "Package Name", fill in the Package Name of your Android App. Same thing for "Key Hashes".
In the field "Class Name", fill in your package name, followed by ".SplashscreenActivity".
In this example, the package name of my app is "com.ApolloApps.ApolloAppsnews", so I entered "com.ApolloApps.ApolloAppsnews.SplashscreenActivity" in the field "Class Name".
Enable "Single Sign-On", and don't forget to click on "Save changes".
Attention: If for any reason, the Bundle ID in your Apollo Apps backend is wrong, it will be important to enter the correct one in the fields "Package Name", "Class Name", and "Key Hashes". This can be the case if, for example, your app is an update of an existing app not created with Apollo Apps.
In this case, the easiest way is to follow the compilation process of your app, and then consult the menu Users > My users > Settings in the Apollo Apps backend: It will be updated with the correct information.
7. Go to Settings > Advanced tab
In the menu on your left, click on "Settings", and then click on "Advanced".
Enable the option "Native or desktop app?", and save the modifications at the bottom of the page.
8. Go to "App Review" tab
In the menu on your left, click "App Review".
Click the button to "Yes" and make your App public.
In the box that will appear, click "Confirm".
9. Check if your app is properly activated
After clicking "Confirm", the page reloads.
"Your app is currently live and available to the public." must be written down, and the button must displays "YES" as shown below.
10. Configuration of the login
In Products menu, click "Add Product" and then "Get Started" next to Facebook Login.
Activate the "Client OAuth Login" and "Web OAuth Login" buttons.
Complete the web app version of your app in the Valid OAuth redirect URIs field.
11. Go to the Dashboard menu
In the menu on the left, click on Dashboard, and copy the value of the "App ID".
12. Paste this value into your Apollo Apps back office
Go to the menu Users > My users > Settings in your Apollo Apps backend, to authorize your users to sign up in your app.
Under External Services, switch Authorize Facebook connection to On and paste your Facebook App ID in the corresponding field. To complete the configuration, click OK at the bottom.
13. The configuration is now finished
The basic configuration of your Facebook application and of your App in the back office are now effective.
You can now rebuild your app so you can test the Facebook authentication on your AdHoc version (click here for the online help iOS, here for the online help Android).
Be careful, as it won't work on My GB app or the back office preview, the only way to test the Facebook authentication to your app is with the AdHoc version.