Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Creating a Facebook data set

Updated on May 17, 2024

You can create a Facebook data set record to track and analyze the text-based content that is posted on the Facebook social media site. By analyzing users' input, you can gain insight that helps you to structure the data in your application to deliver better services to customers and increase your customer base.

Before you begin: Before you create a Facebook data set, register on the Facebook site for developers and create a Facebook application. The application provides the App ID and App secret details that you need to enter in the Facebook data set.

For example, by tracking and analyzing posts on the Facebook page of your organization, you can quickly detect and respond to any issues that your customers might have.

Use the Facebook data set to filter Facebook posts according to the keywords that you specify. First, create a Facebook data to connect with the Facebook API. Next, reference the data set from a data flow and use the Text Analyzer rule to analyze the text-based content of Facebook posts.

Caution: Do not reference a Facebook data set from multiple data flows because stopping one data flow stop the Facebook data set in all other data flows.
  1. In Dev Studio, click CreateData ModelData Set.
  2. Enter the data set label and identifier.
  3. From the Type list, select Facebook.
  4. Provide the ruleset, Applies to class, and ruleset version of the data set.
    Note: The Applies-to class for Facebook data sets must always be Data-Social-Facebook.
  5. Click Create and open.
  6. On the Facebook tab, in the Access details section enter the following information from your Facebook application:
    • App ID
    • App secret
    • Facebook Page Token
    Note: Every page owner has a page token for the owned page. You must obtain this page token to fetch posts, direct messages, and the promoted posts for the page.
    Note: When you enter a valid Facebook token, the Facebook page URL field is automatically populated with the address of the Facebook page from which you want to extract data for text analysis. By clicking that URL, you open the corresponding Facebook page.
  7. Optional: Configure which metadata types to track on the Facebook page. In the Endpoints section, you can select the following metadata types:
    • Posts
    • Direct messages
    • Page timeline and tagged posts
    • Posts that are promoted
    • Comments on posts
  8. In the Search section, enter the time period to retrieve Facebook posts.
    For example, you can retrieve Facebook posts submitted within the last 24 hours. Configure this information if you want to retrieve either historical posts or posts that were not retrieved as a result of a system failure.
  9. In the Track additional Facebook page(s) section, click Add URL, and enter the name of one or more Facebook pages for which you want to analyze text-based content.
    You can analyze only the public posts on these pages.
  10. Optional: Enter the names of users whose posts you want to exclude from analysis by clicking Add follower in the Ignore section.
    Note: See the Facebook Graph API documentation for information about limitations when specifying keywords and authors.
  11. Click Save.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us