Warning: BETA. This connector is a beta version.

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.

Note: The built-in web connectors are only available on Qlik Sense Cloud with a Cloud Business subscription.

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 connection and selecting data

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 in the Facebook Insights Metrics documentation.

Tip: To 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.

The Facebook 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 Insight category.

Insight Category Description
Application 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 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 (*). 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

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 Possible cause

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

Proposed action 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 Possible cause

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

Proposed action Proposed action

Prefex the postID with either the userID or pageID field.

Examples:  

  • userID_postID
  • pageID_postID

Did this information help you?

Can you tell us why it did not help you and how we can improve it?