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

# How to register your own Facebook OAuth app

> Register an OAuth app with Facebook and connect it to Nango

This guide shows you how to register your own app with Facebook to obtain your OAuth credentials (client id & secret). These are required to let your users grant your app access to their Facebook account.

**1. Create a Facebook Developer account**

If you don't already have one, go to [Meta for Developers](https://developers.facebook.com/) and create a developer account.

**2. Create a new app**

1. Go to the [Meta Developer Dashboard](https://developers.facebook.com/apps/).
2. Click **Create App**, enter your **App name** then click **Next**.
3. Select the appropriate **Use cases** then click **Next**.
4. Select which Business portfolio you want to associate with the app, then click **Next**.
5. Review the **Publishing requirements**, then click **Next** if you agree. Finally, click **Go to dashboard** to complete the setup.

**3. Configure OAuth settings**

1. In the left sidebar, navigate to **Facebook Login for Business** > **Settings**.
2. In **Valid OAuth Redirect URIs**, add: `https://api.nango.dev/oauth/callback`, leave the other fields default.
3. Click **Save Changes**.

**4. Add Platform**

1. Go to **App Settings** > **Basic** in the left sidebar.
2. Click **Add Platform** > **Website**.
3. Enter the site URL (e.g. `https://api.nango.dev/`).

**5. Obtain your App credentials**

1. Go to **App Settings** > **Basic** in the left sidebar.
2. Copy your **App ID** this is your **Client ID** and **App Secret** which is your **Client Secret**, you'll need these credentials when configuring your integration in Nango.

**6. Configure permissions**

1. In the left sidebar, navigate to **Use cases**.
2. Find your use case and click **Customize** to configure permissions and features.
3. In the **Permissions** section, you'll see `public_profile` is automatically added.
4. Click **Add** for additional [permissions](https://developers.facebook.com/docs/development/create-an-app/use-cases-permission-mapping) needed for your app.
   \[!NOTE] Some [permissions](https://developers.facebook.com/docs/facebook-login/guides/permissions/review) may require App Review before going live

**7. Next**

Follow the [*Quickstart*](https://nango.dev/docs/getting-started/quickstart.md).

For more details, see [Facebook's OAuth documentation](https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow#confirm) and [how to create an application](https://developers.facebook.com/docs/development/create-an-app/).

## Important notes for Facebook API

* Facebook tokens expire after 60 days and cannot be refreshed. Once a token expires, users must re-authenticate by [re-authorizing the connection](https://nango.dev/docs/guides/primitives/auth.md#re-authorize-an-existing-connection).


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