# Facebook Sign-In

First you need to register your Facebook Developer account&#x20;

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

{% hint style="warning" %}
If you do not have a Facebook account, then you will need to register
{% endhint %}

## 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

<figure><img src="/files/dQtzAJBJLGmWYZGBe4fO" alt=""><figcaption></figcaption></figure>

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

Then we need to choose the application type

<figure><img src="/files/Az4PRXOzNvaERZJ0Pypr" alt=""><figcaption></figcaption></figure>

Then fill in the information

<figure><img src="/files/ZIMsuuMYUb1FInWulqsB" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="/files/av6FWtJ4je8nr3OoXaOo" alt=""><figcaption></figcaption></figure>

1. app\_name - Name of your project
2. facebook\_app\_id - Your project ID
3. fb\_login\_protocol\_scheme

<figure><img src="/files/FchXy18qGW8i98zcpaOS" alt=""><figcaption></figcaption></figure>

4. facebook\_client\_token

<figure><img src="/files/abyQORfvauyU88UF53NO" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/EJ8Ad8w9t2PLEBTeTeVE" alt=""><figcaption></figcaption></figure>

Then select Android platform

<figure><img src="/files/QSzrun9X6Z6BMzGOFYJH" alt=""><figcaption></figcaption></figure>

Then choose a store -> Google Play

<figure><img src="/files/0TbYwUkZroCbYiJPbFyw" alt=""><figcaption></figcaption></figure>

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

**Packages Name** you can find in the file AndroidManifest.xml

<figure><img src="/files/wCWUWeM4qEQz9OfFnSLX" alt=""><figcaption></figcaption></figure>

#### Class Name example: com.stylemixthemes.masterstudyapp.MainActivity

## Key hashes

{% hint style="info" %}
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.
{% endhint %}

{% hint style="info" %}
You must add key hashes for each build variant such as release, debug, CI/CD, etc.
{% endhint %}

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

<figure><img src="/files/p0oHJiF7N3YQbcORTUW1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To put the application into working mode, you need to fill in all the information
{% endhint %}

<figure><img src="/files/5Sw5MDgObL8FwhK8d3g7" alt=""><figcaption></figcaption></figure>

## 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

<figure><img src="/files/NAhjgrUsZN17bM8mj8D6" alt=""><figcaption></figcaption></figure>

## Test User

If you want to create test users

<figure><img src="/files/B6TzwiyosXQLpnzpkfNi" alt=""><figcaption></figcaption></figure>

## 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

<figure><img src="/files/tD626PF8YvNB7zdH561P" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Skip step 2
{% endhint %}

<figure><img src="/files/ZQ4TnfF5phbvd8OBK6hJ" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/mjnzomj4OpuTpWa4o5Fh" alt=""><figcaption></figcaption></figure>

Then add the platform to the Facebook project

<figure><img src="/files/PwQPJ82QBlIfpWJdBEIS" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/RUNCHrI14QgIRIgaDlle" alt=""><figcaption></figcaption></figure>

Enter your Bundle ID (You can find it in [AppStoreConnect](https://appstoreconnect.apple.com/))

<figure><img src="/files/ueyiaPcewuBWDlcE1SSN" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
The more detailed documentation about Facebook Setup work you can find here:&#x20;

<https://facebook.meedu.app/docs/5.x.x/intro>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stylemixthemes.com/masterstudy-app-documentation/ios-app-build-1/facebook-sign-in.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
