Facebook Sign-In

This section will explain how to set up Facebook Sign-In in a project

First you need to register your Facebook Developer account

https://developers.facebook.com/?no_redirect=1

If you do not have a Facebook account, then you will need to register

Android Setup

Link to instructions Facebook Android Setup: https://facebook.meedu.app/docs/5.x.x/android

Once you have created an account, you need to follow the link https://developers.facebook.com/docs/facebook-login/android/?locale=en, to create your project in Facebook Developer

In our case, we need to click on the Create a new app button

Then we need to choose the application type

Then fill in the information

After creating the project, you need to go to Android Studio in the project, and change the values in the variables Open file android/app/src/main/res/values/string.xml, then replace the values: facebook_app_id, fb_login_protocol_scheme, facebook_client_token.

  1. app_name - Name of your project

  2. facebook_app_id - Your project ID

  3. fb_login_protocol_scheme

  1. facebook_client_token

Then, you need to go to the Basic tab, and click on the "Add Platform" button

Then select Android platform

Then choose a store -> Google Play

After creation, you need to specify Packages Name/Class name/Key hashes

Packages Name you can find in the file AndroidManifest.xml

Class Name example: com.stylemixthemes.masterstudyapp.MainActivity

Key hashes

Note: If your app uses Google Play App Subscription, you must obtain the SHA-1 certificate thumbprint from the Google Play Console and convert it to base64.

You must add key hashes for each build variant such as release, debug, CI/CD, etc.

In Android Studio in the terminal, you need to write the following command:

Mac OS Key Hash

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

Windows Key Hash

keytool -exportcert -alias androiddebugkey -keystore "C:\Users\USERNAME\.android\debug.keystore" | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" sha1 -binary | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" base64

Generating a Release Key Hash

keytool -exportcert -alias YOUR_RELEASE_KEY_ALIAS -keystore YOUR_RELEASE_KEY_PATH | openssl sha1 -binary | openssl base64

App Mode

If you want to bring the application into production mode, you need to switch

To put the application into working mode, you need to fill in all the information

Request and Permissions

Also, in order to put the application into production mode, you need to go to the Request and Permissions tab, and access

Test User

If you want to create test users

IOS Setup

Link to Facebook IOS Setup instructions: https://facebook.meedu.app/docs/5.x.x/ios

Link to create an IOS project: https://developers.facebook.com/docs/facebook-login/ios

Settings Facebook IOS Setup

Select an existing project or create a new one

Skip step 2

Then, you need to add your ids to the ios folder, you need to find the file info.plist Path: ios-> Runnes -> info.plist And replace the following fields

Then add the platform to the Facebook project

Enter your Bundle ID (You can find it in AppStoreConnect)

The more detailed documentation about Facebook Setup work you can find here:

https://facebook.meedu.app/docs/5.x.x/intro

Last updated