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
-
Create a developer account with Facebook
. -
Sign in
with your Facebook credentials. -
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.
-
On the Create an app page, choose a use case for your app, and then choose Next.
-
Enter a name for your Facebook app and choose Create App.
-
On the left navigation bar, choose App Settings, and then choose Basic.
-
Record the App ID and the App Secret. You will use them for configuring the Facebook provider in AgentCore Identity.
-
Choose + Add platform from the bottom of the page.
-
On the Select Platform screen, select your platforms, and then choose Next.
-
Choose Save changes.
-
For App Domains, enter the domain of your application and
bedrock-agentcore..region.amazonaws.com -
Choose Save changes.
-
From the navigation bar, choose Products, and then choose Configure from Facebook Login.
-
From the Facebook Login Configure menu, choose Settings.
-
Enter the following redirect URL into Valid OAuth Redirect URIs:
https://bedrock-agentcore.region.amazonaws.com/identities/oauth2/callback -
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" } } }