> ## Documentation Index
> Fetch the complete documentation index at: https://docs.median.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook Login configuration

> Create and configure a Meta app for Facebook Login on iOS and Android, then add its credentials to the Social Login plugin in App Studio.

This guide walks you through creating and configuring a Facebook app to enable Facebook Login. You'll configure settings in Meta's Developer Portal and gather the credentials needed for Median App Studio.

## Before you begin

Make sure you have:

* A [Facebook Developer account](https://developers.facebook.com/)
* Your app's **iOS Bundle ID** (example: `co.median.ios.soclogin`)
* Your app's **Android Package Name** (example: `co.median.android.soclogin`)
* Your app's **Android Key Hash** (available from [`median.deviceInfo()`](https://docs.median.co/docs/device-info#example-deviceinfo-payload) or from the Social Login plugin page in App Studio)
* An Admin or Developer role in your Facebook account
* A verified Business in Meta Business Manager

## Step 1: Create your Facebook app

### 1.1 Start a new app

1. Sign in to [Facebook Developers](https://developers.facebook.com/).
2. Click **My Apps** → **Create App**.

![Create App button on the My Apps page in Meta for Developers](https://mintcdn.com/median-co/7LCOHMhgIef7ewYE/images/docs/6d59778c0c579873d8246e9caa9db44e351d4e2d32a5debe48a3e18cef8dbd13-1.png?fit=max\&auto=format\&n=7LCOHMhgIef7ewYE\&q=85\&s=baf9ef8acc44c19f8c65640d91d84926)

Click 'Create App'

3. Select **Authenticate and request data from users with Facebook Login**.
4. Click **Next**.

### 1.2 Add app details

1. **App Name**: Enter a user-friendly name (shown to users during sign-in)
2. **App Contact Email**: Enter a valid contact email
3. Click **Create App**.

**Save your App ID and Display Name**: After creation, you'll see your **App ID** and **Display Name** in the top-left corner. Copy these values. You'll need them later for Median App Studio configuration.

![App ID and Display Name in the top-left corner of the Meta app dashboard](https://mintcdn.com/median-co/7LCOHMhgIef7ewYE/images/docs/4c736eea6960a56d537c26f4a38ab8af5a03594dfcd9f18854aa192855d6c19d-image.png?fit=max\&auto=format\&n=7LCOHMhgIef7ewYE\&q=85\&s=d0f9d9e6b8aee874307b2baad99faf49)

Display Name (for example, 'Test App') and App ID (for example, 845xxxxxxxx5)

## Step 2: Configure basic settings

### 2.1 Configure OAuth settings

1. In the left sidebar click on **Use cases**
2. For **Authenticate and request data from users with Facebook Login**, click on **Customize**
3. Go to the **Settings** section
4. Enable **"Login with the JavaScript SDK"** (toggle on)
5. Add your **Valid OAuth Redirect URIs**:
   * Example: `https://yourdomain.com/auth/callback`
6. Add your **Allowed Domains for the JavaScript SDK**:
   * Example: `yourdomain.com`
7. Click **Save Changes**.

![Facebook Login settings with JavaScript SDK toggle, redirect URIs, and allowed domains](https://mintcdn.com/median-co/TpSItjrYpkPK-i0N/images/docs/dac8a1cffeeb2cef4086c8300cef94ba2593ec935909ec809f02661ccbe602f5-image.png?fit=max\&auto=format\&n=TpSItjrYpkPK-i0N\&q=85\&s=d07a501f6726d258f8112aac16aaa9f7)

Client OAuth Settings, JavaScript SDK, Redirect URLs & Domains

### 2.2 Configure permissions

1. In the left sidebar: **App Review** → **Permissions and Features**.

2. Add

   * `email` (required for user identification)
   * `public_profile` (required for basic user info)

![Permissions and Features list in App Review with email and public\_profile](https://mintcdn.com/median-co/TpSItjrYpkPK-i0N/images/docs/c54f1f217e16fa6427de8fc9694324965e8bf6eb2106d0bfac17ee574981670f-image.png?fit=max\&auto=format\&n=TpSItjrYpkPK-i0N\&q=85\&s=d2270a68e4a6d8126cbcc41a2a8374ae)

App Permission & Features

> [!WARNING]
>
> **App Review required**
>
> Some permissions require Facebook's approval before going live. [Learn about Facebook App Review](https://developers.facebook.com/docs/app-review).

### 2.3 Get your client token

1. In the left sidebar: **Settings** → **Advanced**.
2. Scroll to the **Security** section.
3. Click **Show** next to **Client Token**.
4. **Copy and save** this token. You'll need it for Median App Studio configuration.

![Client Token field in the Security section of Advanced settings](https://mintcdn.com/median-co/dZQPJ_0wlG7WNBTy/images/docs/2a138b81841f34538e5f916843d25932a641b670bb3e225ebf67c5516414e4b2-image.png?fit=max\&auto=format\&n=dZQPJ_0wlG7WNBTy\&q=85\&s=04ec97826f546974a4fcadb19fb36785)

Facebook Client Token

## Step 3: Add platform configurations

You need to configure **both iOS and Android** platforms (these are separate, parallel steps).

### 3.1 iOS configuration

1. In left sidebar: **Settings** → **Basic**.
2. Scroll to bottom → Click **"+ Add Platform"**.

![Add Platform button at the bottom of Basic settings](https://mintcdn.com/median-co/dZQPJ_0wlG7WNBTy/images/docs/2b6d0a564fd19cccba174e3f88b23a5b26e4183e7f6f84fc42adf6716c758c6d-image.png?fit=max\&auto=format\&n=dZQPJ_0wlG7WNBTy\&q=85\&s=7080d83ab4213d80a4369f0521825b87)

Add Platform

3. Select **iOS**.

4. Fill in:

   * **Bundle ID**: Your iOS Bundle ID (example: `co.median.ios.soclogin`)
   * Add any **test/development Bundle IDs** if applicable.

5. Click **Save Changes**.

**Testing tip:** If you have multiple development builds, add each Bundle ID variant (for example, `com.yourapp.debug`).

**Website configuration:**

1. Same screen: Click **"+ Add Platform"** again
2. Select **Website**
3. **Site URL**: Enter your website URL (example: `https://yourdomain.com`)
4. Click **Save Changes**

> [!WARNING]
>
> **Meta portal instability**
>
> If you encounter saving issues, try: different browser, incognito mode, or VPN connection. You can skip the "iPhone Store ID" field during initial setup.

### 3.2 Android configuration

1. In left sidebar: **Settings** → **Basic**.
2. Scroll to bottom → Click **"+ Add Platform"**.

![Add Platform button at the bottom of Basic settings](https://mintcdn.com/median-co/dZQPJ_0wlG7WNBTy/images/docs/2b6d0a564fd19cccba174e3f88b23a5b26e4183e7f6f84fc42adf6716c758c6d-image.png?fit=max\&auto=format\&n=dZQPJ_0wlG7WNBTy\&q=85\&s=7080d83ab4213d80a4369f0521825b87)

Add Platform

3. Select **Android**.

4. Select **Google Play** store.

5. Click **Next**.

**Fill in the required fields:**

1. **Package Name:** Your Android app's unique identifier. Example: `co.median.android.soclogin`

2. **Class Name:** Use this exact value: `co.median.android.MainActivity`

3. **Key Hash:** Your Android signing certificate hash. If you are using Median to sign your Android app, contact our team to obtain this value.

![Android platform settings with Package Name, Class Name, and Key Hash fields](https://mintcdn.com/median-co/TpSItjrYpkPK-i0N/images/docs/90f9aced132d1367aa9ff111a3574a44201bc4ee48eb8e4719efb5f7a0139d1f-Screenshot_2025-01-22_at_15.49.31.png?fit=max\&auto=format\&n=TpSItjrYpkPK-i0N\&q=85\&s=f24fbb3604155094f00489d3944599d3)

Android configuration

### 3.3 Google Play App Signing

1. Go to Google Play Console → **Release** → **Setup** → **App Integrity**.
2. Copy your **SHA-1 certificate fingerprint**.
3. Convert it using this command:

```bash bash theme={null}
echo YOUR_SHA1_VALUE | xxd -r -p | openssl base64
```

### 3.4 Local debugging

For a local development keystore:

```bash bash theme={null}
keytool -keystore <path-to-keystore> -list -v
```

*Default password: `android`*

> [!NOTE]
>
> **Multiple development machines**
>
> Create a separate OAuth client for each developer's machine using their local SHA-1 fingerprint.

**For debug builds:**

If building debug variants, append `.debug` to your Package Name:

* **Production**: `co.median.android.soclogin`
* **Debug**: `co.median.android.soclogin.debug`

Create separate Facebook platform configurations for production and debug builds.

## Step 4: Review and publish your app

Follow the prompts in the Meta for Developers dashboard to:

1. Complete Facebook's Business verification
2. Complete the App Review Submission
3. Complete all requirements and publish the app.

![Meta for Developers dashboard showing verification, App Review, and publishing steps](https://mintcdn.com/median-co/dZQPJ_0wlG7WNBTy/images/docs/0cb396744c269986cf398dbfaa569b23a472798d1341f9c9fb89232b53f276af-image.png?fit=max\&auto=format\&n=dZQPJ_0wlG7WNBTy\&q=85\&s=191546c7ad8f570c4e80fe1119d99d15)

Meta for Developers dashboard

## Step 5: Add credentials to Median App Studio

Now that your Facebook app is configured, add these credentials to App Studio:

1. Sign in to [App Studio](https://median.co/app).
2. Navigate to: **Native Plugins** → **Social Login** → **Settings**.
3. Enter your **Facebook Configuration**:

| App Studio field | Value from Facebook | Where you found it |
| - | - | - |
| **Application ID** | Your App ID | Dashboard top-left (Step 1.2) |
| **Client Token** | Your Client Token | Settings → Advanced → Security (Step 2.3) |
| **Display Name** | Your App Display Name | Dashboard top-left (Step 1.2) |

![Facebook settings in the Social Login plugin in App Studio](https://mintcdn.com/median-co/7LCOHMhgIef7ewYE/images/docs/5d7581a9d4ab1cd62530b9a800a4592b84075e353ccf79a2c66273d6f5da48fc-Screenshot_2025-07-04_at_11.03.45.png?fit=max\&auto=format\&n=7LCOHMhgIef7ewYE\&q=85\&s=46205d797df458571d9c826496ae7b59)

Social Login plugin configuration

4. Click **Confirm** and **Save**.
5. **Rebuild your app** for changes to take effect.

## Step 6: Test your configuration

Before going live:

* [ ] Test sign-in in your development app
* [ ] Verify token exchange works
* [ ] Test with multiple Facebook accounts
* [ ] Test on both iOS and Android devices
* [ ] Verify that the user profile data is returned correctly

## Important notes

### Facebook Limited Login (iOS)

On iOS, if users decline App Tracking Transparency (ATT) permission, Facebook automatically uses a "Limited Login" method.

**Key differences with Limited Login:**

* Returns a JWT token instead of an access token
* Graph API endpoints are unavailable
* Requires different token validation

### App Tracking Transparency

App Tracking Transparency permission is required to use standard Facebook Login on iOS. If users decline ATT, Limited Login is used automatically.

**Implementation:**

1. Request ATT permission in your app.
2. If the user allows, the standard Facebook Login opens.
3. If the user declines, the Limited Login version opens automatically.

You can also force Limited Login by setting `forceLimitedLogin: true` in your JavaScript Bridge call.


## Related topics

- [Website configuration](https://docs.median.co/docs/social-login-website-configuration.md)
- [Social login overview](https://docs.median.co/docs/social-login.md)
- [Sign in with Apple configuration](https://docs.median.co/docs/sign-in-with-apple-configuration.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.