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

<Steps>
  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="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**.
  </Step>

  <Step title="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/`).
  </Step>

  <Step title="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.
  </Step>

  <Step title="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</Note>
  </Step>

  <Step title="Next">
    Follow the [*Quickstart*](/getting-started/quickstart).
  </Step>
</Steps>

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](/guides/primitives/auth#re-authorize-an-existing-connection).
