Skip to main content Skip to complementary content

Facebook Insights

The Qlik Facebook Insights Connector uses Facebook Insights API and the App Insights API to fetch data based on preconfigured Insights metrics, such as the number of people talking about your Facebook posts or the daily reactions to a Facebook page.

Ways to access your data

To access your Facebook Insights data, you will need to authenticate the connector with your Facebook account credentials. After you create a connection and select Facebook Insights as your data source, you will be redirected to a Facebook login page to retrieve your authentication token.

Creating a data source connection

Loading data from tables

After you authenticate the connector with your account credentials, you select and load data with preconfigured tables. Each table corresponds to a specific Facebook Insights Metric and there are more than 250 preconfigured tables to select data from. A detailed list of Insight Metrics are found iFacebook Insights Metrics documentation.

Tip noteTo see a full list of the available tables and a description of the type of data that is fetched, run the TableNames table after you authenticate the connector. You can download the list of tables as a csv file for your personal reference.

TheFacebook Insights tables allow you to query three main insight categories: Applications, Pages, and Posts. This table outlines some of the common types of data you can fetch with tables from each Facebook Insights category.

Facebook Insights categories
Insight Category DLE Only Description
Application checkmark Use this table to fetch data for a particular app, such as custom events logged by your application or notification clicks sent by an application to a user. This table requires an app ID.
Page - Use this table to fetch data about a particular Facebook page, such as the number of Facebook users you clicked Get Directions on your page. This table requires a page ID.
Post checkmark Use this table to fetch data for a particular post, such as a list of users who watched your video organized by viewing duration. This table requires a post ID.

To select and load data from a table, enter the required table parameters and click Preview data. Required parameters are marked with an asterisk (*) in the dialog. The table fields are displayed under the Data preview tab. You can select fields individually by selecting the box beside each field name. Select Insert script after you have made your selection.

Creating a connection and selecting data

Table parameters

To run most of the tables, you need to enter specific table parameters, usually in the form of an object ID or an object name. You can locate some of the Facebook Insights IDs directly from the Facebook URLs or from your Facebook accountx.

  • Application ID: You can find the application ID from the Application Insights section on your Facebook account.

  • Page ID: This ID is located at the end of the Facebook page URL. The ID can be an integer or text, in the case of vanity URLs. For example, 'qlik' is the page ID in the following URL: www.facebook.com/qlik.

  • Post ID: This ID is located at the end of the Facebook post URL. The ID will be an integer. For example, '10203624447732200' is the post ID in the following URL: www.facebook.com/qlik/posts/10203624447732200

Information note

The Facebook Graph API v2.4 and higher no longer accepts singular links. When fetching data from tables that require the post ID, you have to enter a complex field. For example, UserID_PostID or PageID_PostID.

You receive an error message that singular links are deprecated

Working with the Facebook Insights API quota limit

The Facebook Insights API imposes two types of API rate limits:

Reference - Facebook Insights developer documentation

You can refer to the Facebook Page Insights API documentation to learn more about the requirements and restriction imposed by the Insights API.

Troubleshooting

You receive an error message that you have reached the API rate limit

Possible cause

You have exceeded the API limits that are imposed on the Qlik Web Connectors by the Facebook Insights API.

Proposed action

To reduce the impact of reaching the API rate limits, develop your app with the following in mind:

  • Extract only the data you need.
  • Reload one Facebook Insights-based application at a time.
  • Ensure that loops in your script that make API calls will not result in infinite loops.
  • Select the Ignore Rate Limit Errors option to retrieve all data that is received before exceeding the rate limit.

You receive an error message that singular links are deprecated

Possible cause

You are using a simple postID field to fetch data for an individual post.

Proposed action

Prefex the postID with either the userID or pageID field.

Examples:  

  • userID_postID
  • pageID_postID

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!