Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Excerpt
hiddentrue

The Facebook Skill can search the posts of the Facebook page specified in the configuration.

This Skill is:

  • Built and owned by Soul Machines Ltd.

  • Only supported in English.

  • Powered by the Facebook API.

Note

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.

Demo Video

facebook-demo (1).mov

Prerequisites

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:

'EAANqX1fZBffkBALQGBHoqKC8sSWJhzGxtSKQZBqiuR3WN8FFBJ8q1zGsakI6fHGW3M3g9IXuNaaizKlHZBkVgwXVQxQtZBqIku1o0UJXpLuZAyiUfn9Sv6B06tu6AVgcBlZAZCoRp9rIAZB3iCbhbfMHhlf8ZAvryJlULTFuAZAwlCX2xQcthwBYhfwSUdJAddyJAjOGcyUZCtHZCoParCS0Khscu3JPuibp1xynduMWld70fQZDZD'

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:

'1826384917283927182'

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 'I found several posts on that topic. Please indicate which you want to view.'

Spoken Phrase When No Posts Found

Output phrase that when no posts are found. The default is 'Sorry, I've had a problem looking up answer for {0}'

Spoken Phrase Before Reading the Content

TEXT

Output phrase when the user tells the Digital Person to read a post. The default is 'Ok. Here you go.'

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). 'From Facebook'

Spoken Phrase When It Can’t Handle the Request.

TEXT

Output phrases when a matching post is not found. The default is 'Sorry, I did not understand that'

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 5.

Obtaining your Facebook API Key

  1. Register as a Facebook developer

    1. Go to https://developers.facebook.com

    2. 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.

    3. Follow the steps outlined here: https://developers.facebook.com/docs/development/register/

  2. Create an App through your App Dashboard

    1. 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.

    2. On the App Dashboard, click the green button “Create App”. The app type should be “Business”, but otherwise just follow the directions on-screen.

    3. More information can be found here: https://developers.facebook.com/docs/development/create-an-app

  3. Generate a Page Access Token

    1. 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”.

    2. 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”.

    3. A new section should appear that reads “Permissions”. Verify that “pages_read_engagement” is selected. If not, select it in the drop-down menu.

    4. 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.

  4. Extend the life of the token

    1. 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”.

    2. 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:

  1. From News Feed, click Pages in the left side menu.

  2. Click your Page name to go to your Page.

  3. Click About at the top of your Page. If you don't see it, click More.

  4. Scroll down to find your Page ID below MORE INFO.

Contents

Table of Contents