Setup Auth Mobile Facebook
Last Updated:Β 04 Oct 2021Before proceeding with the steps below, make sure to follow all the steps in this article- πEnable Facebook Login.
Steps and UI visuals in the Facebook Developers page often change and it is hard to keep up with the changes. But they should be similar to the steps mentioned below.
Step 1: Facebook Plugin Propertiesβ
Get App ID and App Name from the Facebook Developers Console.
Step 2: Preparations for Exportβ
- ANDROID EXPORT
- IOS EXPORT
1. Initial Preparations for Android Exportβ
First, follow the steps in this doc: πAndroid Export π
2. Quickstart Facebook App and Dummy Key Hashβ
- Go to Quick Start for Android: https://developers.facebook.com/quickstarts/?platform=android
- Select your app from the dropdown list
- Scroll Down to enter your Package Name and Default Activity Class Name
Default Activity Class Name should look like this:[YOUR_PACKAGE_NAME].MainActivity
- Enter a random value in the Key Hashes. This is a dummy value, you will have to change this later. Make sure that it is 28 characters long.
For example:XXXXXXXXXXXXXXXXXXXXXXXXXXX=
3. Android Export Property & SHA-1 Fingerprintβ
-
- Your Android build type must be Signed.
- It is recommended to use Min. version greater than or equal to 9.0.0
(Select one of the three highlighted options)
- Your Android build type must be Signed.
- Go to Project Settings > Your Android App
- Add your SHA-1 fingerprints.
- If you don't already have a SHA-1 fingerprints and a keystore or want to create a new one, create it from Construct 3 Android Export, as given in the image below.
(Click to magnify image)
- Note down the SHA-1 signature. This is your required SHA-1 signature.
- Download keystore.jks
- You should Choose this keystore for building the apk.
4. Final Release Key Hashβ
- Run the APK, and Sign in with Facebook
- After that, an error Screen will appear. This error will contain the final Hash Key of your App. Copy the Hash Key, as shown in the image above.
- Go to Facebook Developers Console. Enter your Final Key Hash.
Now, you are good to go! Restart the installed apk, and try Sign In with Facebook.
1. Set-up Facebook App & Projectβ
To use this plugin you will need to make sure you've registered your Facebook app with Facebook and have an APP_ID
https://developers.facebook.com/apps.
If you plan on rolling this out on iOS, please note that you will need to ensure that you have properly set up your Native iOS App settings on the Facebook App Dashboard. Please see the Getting Started with the Facebook SDK: Create a Facebook App section, for more details on this.
2. Final Preparations for iOS Exportβ
Follow the steps in this doc: πiOS Export π