- Introduction
- Create an app at Facebook
- Create the Facebook service in Cerb
- Link the connected account to Facebook in Cerb
- Create connected accounts for Facebook Pages
- Use the connected account in bot behaviors
Introduction
In this guide we’ll walk through the process of linking a Facebook account to Cerb. You’ll be able to use Facebook’s full API from bots in Cerb to automate whatever you need.
Create an app at Facebook
Next, you need to create a new app on Facebook for Cerb to connect to.
-
Open https://developers.facebook.com and sign in.
- In the top right, click My Apps » Add a New App.
-
In the menu on the left, select Settings.
-
Under App Domains, add the domain where you host Cerb (e.g.
example.cerb.me
). -
Click the + Add Platform button at the bottom and select Website.
-
In Site URL, add the URL to your Cerb installation (e.g.
https://YOUR-CERB-HOST
). -
Click the blue Saves Changes button in the bottom right.
- Make a note of your App ID and App Secret for the next step.
Create the Facebook service in Cerb
-
Navigate to Search » Connected Services.
-
Click the (+) icon in the top right of the list.
-
Select Facebook.
-
Enter your App ID and App Secret.
-
Click the Create button.
Link the connected account to Facebook in Cerb
-
Navigate to Search » Connected Accounts.
-
Click the (+) icon in the top right of the list.
-
Select Facebook.
-
Click the blue Link to Facebook button.
-
Accept consent on Facebook.
-
Click the Save Changes button.
Create connected accounts for Facebook Pages
-
Navigate to Setup » Connected Accounts.
-
Click the (+) icon above the worklist.
- Click Facebook Pages.
- Name:
(your page name)
- Owner: Cerb
- Facebook Account: (select the Facebook account from above)
- Name:
-
This will display a list of Facebook pages associated with your account. Select one.
- Click the Save Changes button.
You can repeat the steps in this section for all of your Facebook pages.
Use the connected account in bot behaviors
You can use the connected account you just created to access Facebook’s Graph API from bot behaviors in Cerb. This is typically accomplished using the Execute HTTP Request action from a bot, and selecting the connected account in the Authentication: section.
You can import the Facebook Page Bot package for a working example.