Jump to: navigation, search

Creating a Facebook Account

In August 2014 Facebook instituted a new process that alters the support for Facebook Query Language (FQL). This change has required Genesys to make some changes to the process of creating Facebook applications.

As of the publication of this page, the following applies:

  • If you have a working Facebook application that you generated before August 2014, you can continue to use it until August 2016. Do not delete your application; otherwise you will lose compatibility with FQL.
  • If you do not have a working Facebook application that you generated before August 2014, do not create it. Instead, provide a Facebook User ID or the User name of your admin user to Genesys, and we will add your Facebook admin user to Genesys application as a "tester user," and thereby you will be able to obtain your own access token(s), as described in the procedure on this page.
Important
The APIs and other features of social media sites may change with little warning. The information provided on this page was correct at the time of publication (8 January 2015).

This procedure requires Google Chrome, Mozilla Firefox, or Microsoft Internet Explorer 8 or later.

Procedure

  1. If you do not have a Facebook account, create one.
  2. Log in to Facebook as the admin user.
  3. Click the icon with your profile picture in order to see your timeline, as shown in the Figure below:
    Click Profile Picture
  4. On the resulting page, copy the URL from the browser.
    • If your Facebook admin User did not enter a username, the URL includes a long digital string; for example
      https://www.facebook.com/profile.php?id=1000004983480
    • If your Facebook admin User did enter a username, the URL will be more like
      https://www.facebook.com/sam.demo.3
  5. Send an e-mail to Genesys Customer Care with the following text or something similar:
           My Facebook User ID/User Name is contained in the following URL:
           https://URL.copied.from.browser
           Please add it as a tester user so that I can use the Genesys Facebook application for my Genesys Social Engagement Solution.
  6. Genesys then adds your Facebook admin user as Tester User to the Genesys Facebook application. Now you can retrieve the Facebook access token: while logged into Facebook, your Facebook admin user must enter the following URL:
    https://www.facebook.com/dialog/oauth?
    client_id=<application_ID_provided_by_genesys>
    &redirect_uri=https://www.facebook.com/connect/login_success.html
    &scope=public_profile,manage_pages,read_page_mailboxes,publish_actions
    &response_type=token
  7. On the permissions page, click Allow. The resulting page displays the single word success. You are then prompted to set the visibility of posts published by Genesys Facebook driver on your behalf: "Genesys Application Name would like to post to Facebook for you. Who do you want to share these posts with?." Select from the dropdown: Public, Friends of Friends, Friends, and so on.
  8. Make note of the long alphanumeric string following access_code= in the URL (excluding &expires=<number> at the end of the string)—this is your user access token. The access token may not stay visible in the browser’s address field for very long. If it disappears, you can retrieve it from the browser history (click Control-H).
  9. Genesys strongly recommends using the Page Access Token as the main access token (options x-access-token and access-token). Doing so ensures that the Genesys Facebook driver communicates with Facebook on behalf of your particular Facebook Page, and that all posts, comments, and replies are published on behalf of that Page. The Page Access Token is required for Private Messaging monitors.
  10. To check when the user access token expires, go to https://developers.facebook.com/tools/debug and enter in the access token from the previous step.
    1. If your user access token is short lived, you can extend it by entering the following URL in a browser, substituting the Application Id for APPLICATION_ID, the Application Secret for APPLICATION_SECRET, and the token from step 7 for TOKEN:
      https://graph.facebook.com/oauth/access_token?
      grant_type=fb_exchange_token
      &client_id=APPLICATION_ID
      &client_secret=APPLICATION_SECRET
      &fb_exchange_token=TOKEN
    2. This produces a screen with a single line of text consisting of access_token= followed by a long alphanumeric string. Make a note of this string.
      It is the value of the Social Messaging Server configuration option x-access-token.
      Important
      &expires=<number> at the end of the string must not be included in the value of x-facebook-access-token.
  11. You can always revoke your permissions for an application and start again from Step 6. To revoke the permissions for an application:
    1. Open Graph explorer.
    2. Select the application you want to deauthorize.
    3. Enter the User access token you received previously.
    4. Enter me/permissions.
    5. Select DELETE and click Submit.

    Permissions

    For the permission codes to be used in the URL given in Step 6, Genesys recommends the following minimum list:

        public_profile,manage_pages,read_page_mailboxes,publish_actions

    For further details on permissions in the Facebook API v2.2, see https://developers.facebook.com/docs/facebook-login/permissions/v2.2#overview.

    Next Steps

    Deploy Social Messaging Server with a Facebook Channel
This page was last modified on November 30, 2018, at 00:49.

Feedback

Comment on this article:

blog comments powered by Disqus