Welcome Guest, you are in: Login

QVSource: The QlikView & Qlik Sense API Connector (Docs)

This Connector gives you access to the Facebook Insights API and App Insights API, full details on the information these APIs provide can be found here and here respectively.

PLEASE NOTE:
  • You must be the owner or an administrator of the Facebook page, application or domain.
  • Insights data is only available for properties you are an administrator for. There must also be AT LEAST 30 Likes for the page or Facebook object for Insights data to become available.



Usage

Upgrading From V2

This version replaces V2 of this Connector.

Please note that for page, domain and post insights V3 is a straight in replacement for V2 and some of the screen shots below have not yet been updated. To upgrade you simply need to replace FacebookInsightsConnectorV2 with FacebookInsightsConnectorV3 in your load scripts, however in QVSource 1.6.0 and later all requests to FacebookInsightsConnectorV2 will be automatically routed to FacebookInsightsConnectorV3.

HOWEVER Facebook have made a significant upgrade to their application insights API (and it no longer shares the same API endpoint as pages, domains and posts) and so for application insights (available QVSource version 1.6.0.5 and later) you should regenerate and re-test your QlikView or Qlik Sense load scripts.

Tables

There are a large number of Facebook Insights table (approx 250 at time of writing) covering the four main object types:
  • Pages
  • Domains
  • Applications (Available in version 1.0.2 and later of this connector, QVSource version 1.6.0.5 and later.)
  • Posts

You will see in the top left of the connector that QVSource also categorises tables this way. There is also an additional 'Realtime' category which shows all the tables in the above categories which support realtime data.

Image

You can also load the full list of table names into QlikView by selecting the 'All Tables' category and running the 'TableNames' table as shown below.

This table also has columns indicating which tables are realtime as well as which periods each table supports.

Image

You will also find that when you select a specific table you get additional notes about the table below, as highlighted here:

Image

Authentication

Before using the connector you must first authenticate by clicking the 'Authenticate' button:

Image

And entering your Facebook credentials on the screen which follows. Once you have done this you should see your token appear as well as an expiry date for the token:

Image

NOTE: Unfortunately the maximum time which a token can be acquired for is 60 days. It is important that you re-authenticate with the connector before this date to ensure that you continue to get data. We would recommend setting a calendar alert.

Extracting Data

Once you have authenticated you can start extracting data. Select the table you wish to load and fill in values for the object id, start date, end date and period and the click the 'Run' button at the bottom.

Image

You can now go to the 'QlikView Load Script' tab and copy and paste the load script into your QlikView application.

Obtaining The Fan Page Object ID

Often you will be interested in insights data for a Facebook fan page you are administrator to. To find the id (which you will need to enter into this connector) browse to the Facebook page you wish to access.

If the Facebook page has a 'vanity' URL like this:

Image

The you should enter this value into the text box.

Otherwise it will probably look something more like the following, in which case you should enter the highlighted numeric identifier into QVSource:

Image

You should be able to find the ID of other Facebook objects type using this technique or when viewing the built in Facebook Insights dashboard for the object. If you are having trouble locating the ID of the Facebook object you are interested in for other object types, please contact us.

Obtaining Your Domain ID

If you are trying to get insights for your domain you will need to enter the domain ID into QVSource.

To find this, browse to the domain insights section of the Facebook website for the domain you are interested in and copy the ID after the xx_ in the browser address bar into QVSource:

Image

Obtaining Your Application ID

If you are trying to get insights for your domain you will need to enter the domain ID into QVSource.

To find this, browse to the domain insights section of the Facebook website for the application you are interested in and copy the ID after the xx_ in the browser address bar into QVSource.

This should look very similar to the screenshot above for establishing the domain ID.

A note about end_time

The end_time seems to always be returned as midnight pacific time, e.g. something like this:
2011-12-01T08:00:00+0000 or 2011-12-01T07:00:00+0000

You will also see this in the Facebook Insights web page:

Image

Because this end_time returned by the API is actually the end time and it is 00:00/midnight pacific time it actually refers to the data for the day preceding this date in the case of data with a period of 'day'.

We therefore now include a new pacific_date column which you can use to plot your values against. You should however note and possibly inform your users that the dates the data is shown against are relative to the pacific time zone.

Note that for data with other periods (e.g. 'week', 'days_28') you would need to do some further manipulation in your load script of QlikView front end to set this against a useful dimension.

Extracting Data (Advanced)

At time of writing we have configured the connector with all the tables listed here.

In the unlikely event that you cannot find the table you are looking for in QVSource but it is listed here you should be able to go to the 'Advanced' category, select 'CustomTable' and enter the details for the table which should allow you to extract the data.

We would also appreciate if you would tell us if we have missed any tables so that we may add them in to the next release.

Image

Demo Application

You can download a demo application which illustrates how to extract all the tables for all periods for a given Facebook Page here on GitHub.

You can see a screen shot of the UI and data model of this demo application below.

Image

Image

Troubleshooting

Empty White Screen When Trying To Authenticate

If when you try to authenticate with the Connector you see an empty white screen, please try authenticating with this Facebook Page (click the 'Get access' token button) in Internet Explorer. If you also see a white screen then this is not a QVSource issue but rather an issue with your system configuration.

One method we have found of fixing this is turning off the Internet Explorer Advanced Security Configuration. We wouldn't necessarily recommend this as there might be other ways of fixing this issue.

We believe that once you can authenticate successfully with this Facebook Page from Internet Explorer you should also be able to authenticate with the Connector.

Not Getting Token Expiry

If you find that, on authenticating with the connector, you are not seeing a token expiry date shown in the QVSource UI by the token itself, please locate the QVSource Facebook Insights Connector in the Facebook App Settings Tab and delete it, then try re-authenticating with the connector.

API Status

APIs are not error free or always 100% available. If you are having issues with the connector please first check that there are no problems at the API end point. http://developers.facebook.com/live_status/

Also - if you are experiencing an issue with the connector (for example after it was previously working ok) you might also try searching on the Facebook bug tracker for recent bugs which might explain the experience you are having. This will probably be the first place we will look after checking the API status.

Change Log

1.1.2 - 08/04/16
  • Drop down of pages should no longer be limited to first 25.

1.1.1 - 20/02/16
  • Minor internal refactoring/performance improvements (for Web Edition).

1.1.0 - 02/02/16
  • Removed dependency on Microsoft.VisualBasic assembly on startup.

1.0.9 - 07/01/16
  • Added more helpful error message when connector not authenticated.

1.0.8 - 17/12/15
  • Upgraded to version 2.5 of the Facebook Graph API.

1.0.7 - 07/12/15
  • Minor refactoring of web exception handling.

1.0.6 - 03/12/2015
  • Updated Page ID drop down to show "global_brand_page_name (id)" in dropdown rather than just "name" (which is not always unique).
  • Web Edition now shows page picker dropdown.

1.0.5 - 23/10/2015
  • Added CustomRequestAsXml table.

1.0.4 - 23/07/2015
  • Added note to page/post/domain/application ID input parameters reminding user that they need to be admins.

1.0.3 - 08/07/2015
  • BREAKING CHANGE: Removed page_storytellers table/metric. This metric is deprecated after the deprecate_PTAT migration (https://developers.facebook.com/docs/graph-api/reference/v2.3/insights).
  • Fixed bug where realtime tables (e.g. who had * at the end of their name) were no longer working.
  • Fixed bug where data from requests for different object IDs was getting mixed up.
  • Insights tables (excluding application insights) now have empty tables shown (i.e. with column headers) even if no data returned for selected date range.

1.0.2 - 11/05/2015
  • Added a Max number of calls per second input parameter to (almost) all tables. It is difficult to find official documentation on the API call limits but some sources suggest a maximum of 600 calls per 600 seconds. If you are experiencing issues you could try setting this parameter although this will likely significantly slow down your reload speeds.
  • Upgraded to version 2.3 of the Facebook Insights API.
  • Added initial support for application insights.

1.0.2 - 11/05/2015
  • Added a Max number of calls per second input paramater to (almost) all tables. It is difficult to find official documentaion on the API call limits but some sources suggest a maximum of 600 calls per 600 seconds. If you are experiencing issues you could try setting this parameter although this will likely significantly slow down your reload speeds.

1.0.1 - 09/04/2015
  • Input for page is now a prepopulated dropdown in desktop version.

1.0.0 - 13/03/2015
  • Initial version.


(QVSource works with Qlik Sense as well as QlikView - See this page for notes.)
QVSource - The QlikView & Qlik Sense API Connector | © Copyright 2011 - 2016 Industrial CodeBox Ltd