- Created by Chitra Borker, last modified on Nov 01, 2022
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 8
Overview
Facebook Skill will search the posts of the page specified by the configuration for the page id given by the end-user. End-users can request more posts, go back to previous posts, or ask to view one of them again. Posts can contain images or videos that are displayed when the user views them. There also can be links to websites and videos that are clickable but removed when reading.
This Skill is:
Built and owned by Soul Machines Ltd.
Only supported in English.
Powered by the Facebook API.
Important: Twitter Skill and Facebook Skill cannot be part of the same project at this time because they both respond to the same user requests.
Sample conversation:
“User: Show me facebook posts about [Topic]”
“Skill: I found several Facebook posts on that topic. Please indicate which you want to view.”
“User: Tell me about the third one”
“Skill: Ok, here you go (Shows post as a card)”
Demo Video
facebook-demo (1).movPrerequisites
For you to take advantage of the Facebook skill, your user interface must support cards or be able to capture and interpret @commands
and make use of the variables included in the response JSON. This is built into the default theme but would require custom frontend development if you are using custom UI. If card support is not supported, you should set the Max Number Of Posts To Return
setting to 1 so the Digital Person will just read the first post rather than asking for which you want to view.
Configurations
Provide the following information in the Facebook Skill configuration screen:
Field | Type | Description |
---|---|---|
Facebook API KEY REQUIRED | TEXT | Enter your Facebook API key. Example: ' |
Facebook Page ID REQUIRED | NUMBER | The unique identifier for the Facebook page that is being accessed. To find your organization’s page ID see Find Facebook Page ID. Example: ' |
Spoken Phrase When Listing The Posts Found | TEXT | Output phrase can be customized to change the tone or wording of the verbal response. The default is |
Spoken Phrase When No Posts Found | Output phrase that when no posts are found. The default is | |
Spoken Phrase Before Reading the Content | TEXT | Output phrase when the user tells the Digital Person to read a post. The default is |
Spoken Phrase When Only One Post Found Before Reading It | TEXT | Output phrase when only one post is found (either there was only one or Max Number Of Posts was set to one). |
Spoken Phrase When It Can’t Handle the Request. | TEXT | Output phrases when a matching post is not found. The default is |
Max Number of Posts to Return | NUMBER | Specifies the number of posts returned. It can be a number between 1 to 5. The default value is |
Obtaining your Facebook API Key
Register as a Facebook developer
You need to register the Facebook account that has administrative access to your organization’s Facebook page as a developer account. It is advised to keep this account separate from your personal Facebook account.
Follow the steps outlined here: https://developers.facebook.com/docs/development/register/
Create an App through your App Dashboard
Go to https://developers.facebook.com/ and log in with your registered developer account. Then, click “My Apps” and it should take you to your App Dashboard.
On the App Dashboard, click the green button “Create App”. The app type should be “Business”, but otherwise just follow the directions on-screen.
More information can be found here: https://developers.facebook.com/docs/development/create-an-app
Generate a Page Access Token
Go to https://developers.facebook.com/tools/explorer/ and make sure you are logged in. On the right there should be a section with the title “Access Token”.
Under “Facebook App” select your created app in the drop-down menu. Under “User or Page” select “Get Page Access Token”. A pop-up window should appear verifying your login. You will then have to select the Facebook page(s) that will be affected by the token you are generating. On the next window, select “Yes” for both permissions shown and click “Done”.
A new section should appear that reads “Permissions”. Verify that “pages_read_engagement” is selected. If not, select it in the drop-down menu.
Finally, select “Generate Access Token”. This token is what you will need to provide in order for the skill to be able to access the posts on your Facebook page.
Extend the life of the token
Immediately after generating the access token, you need to extend the life of the token, as it will expire in about an hour. Copy the access token onto your clipboard. Then, on the header of the page, hover over “Tools” and then select “Access Token Debugger”.
In the text box, paste the access token you just copied and select “Debug”. At the bottom, select “Extend Access Token”. A new access token will be provided at the bottom of the page. This one will expire in about 3 months. This is the access token that you should save.
Find Facebook Page ID
To find Page ID of the Facebook page you own or admin:
From News Feed, click Pages in the left side menu.
Click your Page name to go to your Page.
Click About at the top of your Page. If you don't see it, click More.
Scroll down to find your Page ID below MORE INFO.
Contents
- No labels