# UserPoolIdentityProviderFacebookProps

Properties to initialize UserPoolFacebookIdentityProvider.

Extends: UserPoolIdentityProviderFacebookProps
Extends: UserPoolIdentityProviderProps
Used as props by: UserPoolIdentityProviderFacebook

- Source: [`aws-cognito/lib/user-pool-idps/facebook.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-cognito/lib/user-pool-idps/facebook.ts#L11)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';

declare const providerAttribute: cognito.ProviderAttribute;
declare const userPool: cognito.UserPool;
const userPoolIdentityProviderFacebookProps: cognito.UserPoolIdentityProviderFacebookProps = {
  clientId: 'clientId',
  clientSecret: 'clientSecret',
  userPool: userPool,

  // the properties below are optional
  apiVersion: 'apiVersion',
  attributeMapping: {
    address: providerAttribute,
    birthdate: providerAttribute,
    custom: {
      customKey: providerAttribute,
    },
    email: providerAttribute,
    emailVerified: providerAttribute,
    familyName: providerAttribute,
    fullname: providerAttribute,
    gender: providerAttribute,
    givenName: providerAttribute,
    lastUpdateTime: providerAttribute,
    locale: providerAttribute,
    middleName: providerAttribute,
    nickname: providerAttribute,
    phoneNumber: providerAttribute,
    preferredUsername: providerAttribute,
    profilePage: providerAttribute,
    profilePicture: providerAttribute,
    timezone: providerAttribute,
    website: providerAttribute,
  },
  scopes: ['scopes'],
};
```

## Properties

- `apiVersion`: string = to the oldest version supported by Facebook — The Facebook API version to use.

  **Default:** to the oldest version supported by Facebook

- `attributeMapping`: [AttributeMapping](/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.AttributeMapping.html) = no attribute mapping — Mapping attributes from the identity provider to standard and custom attributes of the user pool.

- `clientId`: string (required) — The client id recognized by Facebook APIs.

- `clientSecret`: string (required) — The client secret to be accompanied with clientId for Facebook to authenticate the client.

- `scopes`: string[] = [ public_profile ] — The list of Facebook permissions to obtain for getting access to the Facebook profile.

- `userPool`: [IUserPool](/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.IUserPool.html) (required) — The user pool to which this construct provides identities.
