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.
Facebook Insights Metric 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.
|Insight Category||DLE Only||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
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
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:
- User-based limits
- Application-based limits
The user-based limits apply to each user who is accessing the Facebook Graph API through your app and the application-based limit applies cumulatively for all users. See, You receive an error message that you have reached the API rate limit
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.
You receive an error message that you have reached the API rate limit
You have exceeded the API limits that are imposed on the Qlik Web Connectors by the Facebook Insights API.
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.