# Create New Facebook Channel

This section describes how to create a new Facebook page channel, by doing the following steps:

Go to the **Integration** menu and click the **Channel Connector** menu, then you will see a channel connector page such as image below.

![Channel Connector](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FjI1aClGqWEigQAQtFUax%2Fchannel%20connector%20fb%20edit.png?alt=media\&token=5b8d4a24-cb22-40fa-aed7-1251b807789a)

On the channel connector page, click the **'Plus'** button on the box channel Facebook page, and then you will see a pop-up channel setting.&#x20;

![Channel Setting](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FejLzy2vuYd6ZxIJdY6Ty%2FChannel%20setting%20fb%20edit.png?alt=media\&token=6e3b678e-6926-480a-b72a-bdc54b1e3668)

**Component Explanation:**

<table><thead><tr><th width="311.5">Name</th><th>Description</th></tr></thead><tbody><tr><td>App ID</td><td>A unique identification number will be added to your App.</td></tr><tr><td>App Secret</td><td>Facebook app will automatically generate a secret code connected with your app. Its purpose is to authenticate requests from the application to Facebook servers.</td></tr><tr><td>Page Access Token</td><td>A page access token to start using the platform APIs or to manage and access your page.</td></tr><tr><td>Version</td><td>API Version used on your Facebook app.</td></tr></tbody></table>

### Get App ID

Copy Facebook page **'App ID'** to the channel settings page which can be found on the **'Settings'** section and select '**Basic'** from the drop-down menu. Settings basic console will be displayed. See the image below.

![Basic Settings](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FGoQOSXux61q1DvJMxTJN%2FApp%20id%20edit.png?alt=media\&token=7527a009-23ca-4a6a-bb2e-8c68ec4d2e06)

Paste **'App ID'** into the pop-up channel settings.

![App ID](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2F1nfQVOjHT9mZ4U4ssK9N%2FApp%20id%20channel%20setting%20edit.png?alt=media\&token=318d1378-5b4e-41ae-aa50-555f640ef355)

### Get App Secret

Copy the Facebook page **'App Secret'** to the settings page which can be found on the **'Settings'** section and select **'Basic'** from the drop-down menu. The basic app's settings will be displayed, and click the **'Show'** button on the app's secret. See the image below.

![Basic Settings](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FIu7rSGOSuxQVcWj60UbS%2FApp%20secret%20edit.png?alt=media\&token=a748087e-05fd-4a21-80a4-18c48b2012e8)

Paste **'App Secret'** into the pop-up channel settings.

![App Secret](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FWkdQj1qTneYgxyOwlgCN%2FApp%20secret%20channel%20setting%20edit.png?alt=media\&token=7d2aa211-f683-4159-81d2-923410548c1f)

### Get Page Access Token

Paste **'Page Access Token'** into the Facebook page channel settings box.

![Page Access Token](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2F0hHPdX5XQ0oT5G9nb8Pi%2Fchannel%20setting%20page%20access%20token%20edit.png?alt=media\&token=bd2a950f-e8e0-4cac-836a-229cae4595cf)

You can get a page access token by following the steps below.

#### Obtain Short-Lived Page Access Token

Click the **'Tools'** menu and select '**Graph API Explorer'**.

![Graph API Explorer](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FpaoKxCXcGTbyHUjKPsPs%2FGraph%20api%20explorer%20edit.png?alt=media\&token=119fdd7f-f506-44b6-829d-b2e46906403c)

In the field **Meta App**, select an app used to obtain the page access token.

![Select Meta Application](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2F8gPIBavn99veAHuIk33a%2Fselct%20application%20access%20token.png?alt=media\&token=2977ee59-7f41-4934-ae57-db3b85b34599)

Click **Get Token** → **Get Page Access Token** and select your Facebook app.&#x20;

![Page Acces Token](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FSu7d5rXMlSxwvjlUm5Ah%2Fget%20page%20access%20token.png?alt=media\&token=6e4d841f-f25c-4ea1-8794-05aa92c76cf7)

Then, select permission for your access token. To know about what permission must be selected, please refer to [this](https://docs.3dolphins.ai/integration/channel-connector/facebook/how-to-create-facebook-app/permission-and-feature) documentation.&#x20;

<figure><img src="https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FjIwfzESmwjEEzV3Dljrm%2Fselect%20permission%20user%20access%20token.png?alt=media&#x26;token=75658d5b-f25f-474f-86cd-1c5e43b6487e" alt=""><figcaption><p>Select Permission</p></figcaption></figure>

Click **'Copy'** on your **Page Access Token**.

![Copy Page Access Token](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FMu82Jgx1KF193FT2lK3v%2FGenerate%20access%20token.png?alt=media\&token=18de05d9-54ba-4cee-b7a7-6cd964041121)

Check the properties in [**Access Token Debugger**](https://developers.facebook.com/tools/debug/accesstoken), click **Tool** to see the token in **Access Token Debugger**, paste the access token copied in the last step above to the text field and click the **'Debug'** button.

![Access Token Debugger](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FYkcWxFsBUiJf4TAPS1N9%2FAcess%20token%20debugger.png?alt=media\&token=986d0b6e-c2cb-405d-a96a-1c8017c428f5)

Please check the followings:

![Page Access Token](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2F2ev9qqGGjKKFLPLKBzNJ%2FAccess-Token-Debugger-Facebook-for-Developers%20edit.png?alt=media\&token=b1b6c445-8f6e-42da-87a7-08c3ae3a7b0d)

1. **App ID**: the app id mentioned in the pre-requisite section.
2. **Type**: page.
3. **User ID**: you, a person who has admin rights to the Facebook Page mentioned in the pre-requisite section.
4. **Expires**: a time stamp that would probably expire in an hour or two.
5. **Scopes:** includes predetermined added permissions.&#x20;

#### **Exchange for Long-Lived Page Access Token**

Click **Extend Access Token** to get a long-lived token.

![Extend Access Token](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FC1SpbleEDuRsxMFDv7aX%2FExtend%20access%20token.png?alt=media\&token=dae8da34-aa66-4629-b82d-7c7340c238d7)

Click the '**Debug'** button.

![Debug](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FM3pY7ppj3pyZVyUCI2HP%2FDebug%20extend%20access%20token%20edit.png?alt=media\&token=b060da1c-d9be-4121-8621-468ef7bf221f)

Then, Facebook will ask you to enter your account password and click the **'Submit'** button.

<figure><img src="https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FJkXMf370Dpn125kqYPHM%2Fenter%20password%20to%20extend.png?alt=media&#x26;token=7294f01a-e294-4b23-a4ad-c36071b2737a" alt=""><figcaption><p>Re-enter Password</p></figcaption></figure>

Check the properties of this access token in **Access Token Debugger**. It should have a longer time such as 60 days, or Never in the **Expires**.

![Page Access Token](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2F00KC0us9ZttORqL3yLgi%2FExpired%20longer%20edit.png?alt=media\&token=37920923-b2d4-443b-9d89-51581899efe1)

1. **App ID**: the app id mentioned in the prerequisite section.
2. **Type**: page.&#x20;
3. **Profile ID**:&#x20;
4. **User ID**: you, a person who has admin right to the Facebook Page mentioned in the prerequisite section
5. **Expires**: About 2 Months.

Next, select the version and click the **'Authorize'** button.

![Authorize Channel](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2Fr6KUtnxpuX9VpusGk0XY%2FAuthorize%20fb%20edit.png?alt=media\&token=576e3398-ede8-428f-8997-d91d3beac18d)

On the pop-up, click '**Add Page Channel'**.

![Pop-up Authorization](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FwgyZ8Ed4KPDjcov2Js6z%2Fadd%20page%20channel%20edit.png?alt=media\&token=a9981298-8333-4dc3-a39e-b1f5ce280b08)

If authorize successfully, click the **'Save'** button.&#x20;

<figure><img src="https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FG0wHqP0r5XmQMvzkUgwg%2Fsave%20channel%20fb%20edit.png?alt=media&#x26;token=cd088ca4-d7f3-482b-a75e-4b1c86541ea3" alt=""><figcaption><p>Save Channel Setting</p></figcaption></figure>

And then, the Facebook page channel **Divers Dolphins** has successfully created.

![Add New Facebook Channel](https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2FItbD6RsrbDQCasWhX3Op%2Fchannel%20fb%20added%20edit.png?alt=media\&token=9bfaa4d6-8193-4358-968e-8dd52c0d47c2)

**Component Explanation:**

<table><thead><tr><th width="92.66666666666666">No.</th><th width="226">Component</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Channel Name</td><td>Name of your Facebook Page channel. Hover on the channel name to view the channel port.</td></tr><tr><td>2.</td><td>Channel ID</td><td>Each channel registered in Omni Channel 3Dolphins has a different ID.</td></tr><tr><td>3.</td><td>Channel Config Button</td><td>Click to edit the LOBs that can access this channel and your Facebook API version.</td></tr><tr><td>4. </td><td>Channel URL Edit Button</td><td>Click to edit channel URL. If connecting with proxy, please adjust the URL accordingly.</td></tr><tr><td>5</td><td>Channel URL Copy Button</td><td>Click to copy the channel URL to the clipboard.</td></tr><tr><td>6</td><td>Online / Offline Button</td><td>Click to turn on or off the channel. Red means offline, Green means online.</td></tr><tr><td>7</td><td>Refresh Button</td><td>Refresh your channel at any time to ensure you are always up to date with the refresh button.</td></tr></tbody></table>

Then, you must add **Port** to the channel URL that has been added. To find the channel port, hover over the channel name, then enter the port on the **'Channel Edit URL'** button.

<figure><img src="https://765826444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYDAnLjpg2T8z2BplJOS%2Fuploads%2F06pXpSlgFaS2uiNuIBgX%2Fadd%20port%20channel%20fb%20edit.png?alt=media&#x26;token=b37aa3cd-0d93-4cb3-bb4c-3aac00f256c9" alt=""><figcaption><p>Add Port Channel</p></figcaption></figure>

{% hint style="info" %}
This channel URL will be used as a callback URL when configuring the messenger platform on your Facebook application.
{% endhint %}
