Facebook Channel

The Facebook channel can handle multiple accounts and will create tickets on new posts on your Facebook page and messages to the page.

Contents

Activate or Deactivate Channel

The Facebook channel is disabled by default and needs to be activated before use. To do this, go to Settings -> Tickets -> Channels and click the "Activate" link on the Facebook channel row. The channel can be deactivated in the same way, instead this time by clicking the "Deactivate" link on the same row.

Creating an Account

Prerequisites

Before proceeding any further with this guide, please ensure you meet the following prerequisites:

Facebook Setup

The integration requires a Facebook page and Facebook developer application to function. Below guides you through the process to set this up.

  1. Login to Facebook.
  2. Browse to your Facebook page, click the "About" link under the "More" dropdown, and scroll down to the "Page ID" row.
    Facebook About
    Facebook Page ID
  3. Visit the "My Apps" page on the Facebook developers website and click the "Create App" button.
    Facebook Create App
  4. Select "Business" for the app type and continue. Next type in a name for the application, the name is not important, a contact email, and select "Yourself or your own business" as the app purpose, then finally click the "Create App" button.
    Facebook Create App - Step 1
    Facebook Create App - Step 2
  5. The screen will load with your new app. Click the "Settings" > "Basic" option in the sidebar, scroll to the bottom of the page and click the large "+ Add Platform" button. Click the "Website" option.
    Facebook Add Platform
  6. Enter the main domain for the help desk under "Site URL", and enter the same URL in the "App Domains" field above. You'll also need to set the privacy policy URL and an app icon to be able to complete the App Review later.
    Facebook Website
    Facebook App Domains
  7. Click "Save Changes".
  8. Under "Products" in the sidebar click the "+" button. Look for "Facebook Login" and click on the "Set Up" button.
    Facebook Login Setup
  9. Click "Settings" in the sidebar under the "Facebook Login".
    Facebook Login Settings
  10. Under the "Valid OAuth Redirect URIs" section, enter the SupportPal callback URL. The URL can be found in your SupportPal interface by browsing to Settings > Tickets > Channels > Facebook > Settings > Add Account.
    SupportPal OAuth Redirect URI
    Facebook OAuth Redirect URI Setting
  11. Click "Save Changes".

SupportPal Setup

Now we've created a Facebook page and Facebook developer application, we need to link them to the helpdesk.
  1. Visit Settings -> Tickets -> Channels in SupportPal and click on the "Settings" link on the Facebook channel row. If you're creating a new account click "Add Account", or if you're updating an existing account, search for it and click the edit (pencil) icon on the right side of the table row.
  2. Complete the input fields:
    1. Page Name - Enter the page name.
    2. Active - If the account is active and should be included when polling for new posts and messages.
    3. Page ID - The page ID found on the "About" tab on the Facebook page.
    4. Application ID - The app ID found on the application page.
    5. Application Secret - The app secret found on the application page.
    6. Import From - Lets the ticket importing start from a specified date, for example set to today's date to avoid any old posts and messages being imported. This option is only available for new accounts.
    7. Import Posts - If it should convert wall posts or comments made to your Facebook page into tickets.
    8. Import Messages - If it should convert messages sent to your Facebook page into tickets.
    9. Default Department - Select the department in which messages sent to this account should be opened as tickets in.
    10. Default Priority - Select the priority with which tickets opened by this account are set as.
  3. Once all the details have been entered, click the "Get Access Token" button and you will be redirected to Facebook. Follow through all the popups that are shown, which will just be making sure that you are allowing the application to post on the page's behalf. You will not have to change any of the permissions, simply press "OK" on each popup window as seen in the screenshots below.

    Facebook Access Token Step 1

    Facebook Access Token Step 2

    Facebook Access Token Step 3

    Facebook Access Token Step 4


    Finally you will return back to the help desk with an access token.
  4. Click the "Submit" button to finish.

Facebook App Review

The app review must be done in two parts, the first to get permissions for posts sent to the page and the second for messages sent to the page. Both parts are needed to successfully use the channel.

Part 1: Posts

  1. Click "App Review" in the sidebar and then "Permissions and Features".
  2. Search for and request advanced access to the following permissions:
    • pages_show_list
    • pages_manage_engagement
    • pages_manage_metadata
    • pages_read_engagement
    • pages_read_user_content
  3. Click "Continue the Request".
Complete App Verification
Platform Settings
Provide detailed step-by-step instructions on how a reviewer can test your integration and how you are using the requested permissions or features. Include any testing credentials required to access your integration.
My app doesn't use the Facebook Login dialog.
My app or integration sits behind a local intranet.

I am running help desk software by SupportPal (https://www.supportpal.com/). The software is used to converse with our customers via different social media platforms and email. It contains sensitive user data which we cannot expose to third parties such as Facebook.
Requested Permissions and Features
Tell us how you'll use pages_show_list
Please provide a detailed description of how your app uses the permission or feature requested, how it adds value for a person using your app, and why it's necessary for app functionality.

                SupportPal is self-hosted help desk software which runs behind our local intranet to protect user data. We use it to converse with our customers over different social media platforms and email.

This Facebook application is designed to only access our Facebook page and to ease management of replying to user generated posts.
            
Provide a detailed step-by-step video walkthrough of how your app will use this permission or feature so we can confirm it is used correctly and does not violate our policies.

                Screencast 1 - https://drive.google.com/file/d/1l9Zxvq6Q95Lyk9nMKelm685TMHATIU_D/view?usp=sharing
            
Tell us how you'll use pages_manage_engagement
Please provide a detailed description of how your app uses the permission or feature requested, how it adds value for a person using your app, and why it's necessary for app functionality.

                SupportPal is self-hosted help desk software which runs behind our local intranet to protect user data. We use it to converse with our customers over different social media platforms and email.

                This Facebook application is designed to only access our Facebook page and to ease management of replying to user generated posts.

                The SupportPal software uses the pages_manage_engagement permission to reply to user generated page posts via the /page-id/comments end point. A periodic cron task reads user generated page posts, converting the users name and the contents of the of the post into a help desk ticket. Help desk staff then reply to the ticket which will post a comment on the users Facebook post via the /page-id/comments end point.

                It is only possible for authenticated help desk staff to reply to user generated Facebook posts on our page.
            
Provide a detailed step-by-step video walkthrough of how your app will use this permission or feature so we can confirm it is used correctly and does not violate our policies.

                Screencast 1 - https://drive.google.com/file/d/1l9Zxvq6Q95Lyk9nMKelm685TMHATIU_D/view?usp=sharing
            
Tell us how you'll use pages_manage_metadata
Please provide a detailed description of how your app uses the permission or feature requested, how it adds value for a person using your app, and why it's necessary for app functionality.

                SupportPal is self-hosted help desk software which runs behind our local intranet to protect user data. We use it to converse with our customers over different social media platforms and email.

                This Facebook application is designed to only access our Facebook page and to ease management of replying to user generated messages.

                The SupportPal software uses the pages_manage_metadata permission to access the /page-id/conversations end point. A periodic cron task fetches user generated page messages. It converts the users name, profile picture and message contents into a help desk ticket. The /page-id/messages end point is then used to post a reply back to the user via the help desk ticket. This functionality is only available to authenticated help desk staff.
            
Provide a detailed step-by-step video walkthrough of how your app will use this permission or feature so we can confirm it is used correctly and does not violate our policies.

                Screencast 2 - https://drive.google.com/file/d/1NlgxgDgvOQ-pgPvA3NpQqjRBjOJ4HsX4/view?usp=sharing
            
Tell us how you'll use pages_read_engagement
Please provide a detailed description of how your app uses the permission or feature requested, how it adds value for a person using your app, and why it's necessary for app functionality.

                SupportPal is self-hosted help desk software which runs behind our local intranet to protect user data. We use it to converse with our customers over different social media platforms and email.

                This Facebook application is designed to only access our Facebook page and to ease management of replying to user generated posts.

                The SupportPal software uses a periodic cron task which reads both user generated and page posts as well as their associated comments. The Facebook users' name and the message are converted into a help desk ticket. Help desk staff then reply to the ticket which will post a comment on the Facebook post via the /page-id/comments end point.

                It is only possible for authenticated help desk staff to reply to user generated Facebook posts on our page.

                The pages_read_engagement permission is required as it is listed as a dependency of pages_manage_engagement permission.
            
Provide a detailed step-by-step video walkthrough of how your app will use this permission or feature so we can confirm it is used correctly and does not violate our policies.

                Screencast 1 - https://drive.google.com/file/d/1l9Zxvq6Q95Lyk9nMKelm685TMHATIU_D/view?usp=sharing
            
Tell us how you'll use pages_read_user_content
Please provide a detailed description of how your app uses the permission or feature requested, how it adds value for a person using your app, and why it's necessary for app functionality.

                SupportPal is self-hosted help desk software which runs behind our local intranet to protect user data. We use it to converse with our customers over different social media platforms and email.

                This Facebook application is designed to only access our Facebook page and to ease management of replying to user generated posts.

                The SupportPal software uses the pages_read_user_content permission to fetch user generated page posts and comments via the /page-id/feed and /page-id/comments end points respectively. A periodic cron task reads user generated page posts, converting the users name and the contents of the of the post/comment into a help desk ticket.
            
Provide a detailed step-by-step video walkthrough of how your app will use this permission or feature so we can confirm it is used correctly and does not violate our policies.

                Screencast 1 - https://drive.google.com/file/d/1l9Zxvq6Q95Lyk9nMKelm685TMHATIU_D/view?usp=sharing
            
Complete App Settings - Review your app settings
  1. Scroll down to "Complete App Settings" and click "Review your app settings". Fill out the remaining fields and click "Save".
  2. Finally, click the "Submit for Review" button.

Part 2: Messages

  1. Under "Products" in the sidebar click "Add Product". Hover over the Messenger option and click the "Set Up" button that appears.
  2. Scroll down to "Access Tokens", click on the "Add or Remove Pages" link. Follow the process and select the correct Facebook page.
  3. Scroll down to "App Review for Messenger" and click the "Add to Submission" button for "pages_messaging"
  4. Under "Current Submission", click "Add details" and a popup will appear. Fill out the fields using the information provided below:
    1. Check I agree to Facebook's permission and feature usage guidelines.
    2. Tell us about the use case(s) for your app will use the permission for
      
                          Involved business integration to support live chat by humans.
                      
    3. Test and reproduce the functionality of your integration:
      Select the Facebook page and fill in the textarea with the following:
      
                          SupportPal is self-hosted help desk software which runs behind our local intranet to protect user data. We use it to converse with our customers over different social media platforms and email.
      
                          This Facebook application is designed to only access our Facebook page and to ease management of replying to user generated messages.
      
                          The SupportPal software uses the pages_messaging permission to access the /page-id/conversations end point. A periodic cron task fetches user generated page messages. It converts the users name, profile picture and message contents into a help desk ticket. The /page-id/messages end point is then used to post a reply back to the user via the help desk ticket. This functionality is only available to authenticated help desk staff.
                      
    4. Show us how you're using this permission or feature
      
                          Screencast 2 - https://drive.google.com/file/d/1NlgxgDgvOQ-pgPvA3NpQqjRBjOJ4HsX4/view?usp=sharing
                      
  5. Click "Submit For Review".

App Review Successful

Once your app has been accepted by the app review process, it is critically important that you switch the app from "development mode" to "public". This ensures that content published by the app is visible to other Facebook users.

  1. Click "App Review" and toggle the option to make the application public, follow the steps shown.
    Facebook App Review
  2. Ensure the application shows as status "Live"
    Facebook App is Live

Delete an Account

To delete an account, follow the below steps:

  1. Visit Settings -> Tickets -> Channels and click on the "Settings" link on the Facebook channel row.
  2. Search for the account you wish to delete.
  3. Click the delete (cross) icon located on the right of the table.
  4. Click on the left button, "Yes, I'm sure", that pops up confirming you would like to delete this account and it will then be deleted.

Modifying the Polling Time

The active accounts are polled automatically by a scheduled task (See Scheduled Tasks). Edit the scheduled task to change the polling frequency and you can manually run the task to verify it's working.