Skip to main content

Setup Auth Mobile Facebook

Last Updated:Β 04 Oct 2021
note

Before proceeding with the steps below, make sure to follow all the steps in this article- πŸ“„Enable Facebook Login.

note

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​


1. Initial Preparations for Android Export​

First, follow the steps in this doc: πŸ“„Android Export πŸ“Œ


2. Quickstart Facebook App and Dummy Key Hash​

  1. Go to Quick Start for Android: https://developers.facebook.com/quickstarts/?platform=android
  2. Select your app from the dropdown list
  3. Scroll Down to enter your Package Name and Default Activity Class Name
    Default Activity Class Name should look like this: [YOUR_PACKAGE_NAME].MainActivity
  4. 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)
  1. Go to Project Settings > Your Android App
  2. Add your SHA-1 fingerprints.
  3. 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​

  1. Run the APK, and Sign in with Facebook
  2. 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.
  3. 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.