

# Facebook
Facebook

Facebook can be configured as an AgentCore Identity credential provider for outbound resource access. This allows your agents to authenticate users through Facebook’s OAuth2 service and obtain access tokens for Facebook API resources.

## Outbound


 **Step 1** 

Use the following procedure to set up a Facebook OAuth2 application and obtain the necessary client credentials for AgentCore Identity.

 **To configure a Facebook OAuth2 application** 

1. Create a [developer account with Facebook](https://developers.facebook.com/docs/facebook-login).

1.  [Sign in](https://developers.facebook.com/) with your Facebook credentials.

1. From the **My Apps** menu, choose **Create New App**.
**Note**  
If you don’t have an existing Facebook app, you will see a different option. Choose **Create App**.

1. On the **Create an app** page, choose a use case for your app, and then choose **Next**.

1. Enter a name for your Facebook app and choose **Create App**.

1. On the left navigation bar, choose **App Settings** , and then choose **Basic**.

1. Record the **App ID** and the **App Secret** . You will use them for configuring the Facebook provider in AgentCore Identity.

1. Choose **\$1 Add platform** from the bottom of the page.

1. On the **Select Platform** screen, select your platforms, and then choose **Next**.

1. Choose **Save changes**.

1. For **App Domains** , enter the domain of your application and `bedrock-agentcore.region.amazonaws.com`.

1. Choose **Save changes**.

1. From the navigation bar, choose **Products** , and then choose **Configure** from **Facebook Login**.

1. From the **Facebook Login** **Configure** menu, choose **Settings**.

1. Enter the following redirect URL into **Valid OAuth Redirect URIs** :

   ```
   https://bedrock-agentcore.region.amazonaws.com/identities/oauth2/callback
   ```

1. Choose **Save changes**.

 **Step 2** 

To configure Facebook as an outbound resource provider, use the following:

```
{
  "name": "Facebook",
  "credentialProviderVendor": "FacebookOauth2",
  "oauth2ProviderConfigInput" : {
    "includedOauth2ProviderConfig": {
      "clientId": "your-client-id",
      "clientSecret": "your-client-secret"
    }
  }
}
```