Querying Facebook using ShufflePoint (preliminary)

Summary

Our current Facebook integration should be considered a functional prototype. The Facebook API doesn't really have a concept of "Timeframe" liks most datasources. The results is that currently you must query each period (e.g. Month) separately. Our hope is that Facebook adds better support for historical data. In the mean time, follow the samples below.

Setup

Grant ShufflePoint access to your Facebook account. Here is the direct link to the datasource setup page.

Finding Page IDs

You'll need to use a page ID in your query. The easiest way to find the ID is to start with your page. For example:

https://www.facebook.com/barackobama

And just change the "www." to "graph."

https://www.facebook.com/barackobama

You will find page ID as a long number on the line which begins with "id":

Running Queries

An example query is:

SELECT NoRowHeaders
METRICS fb:page_impressions ON COLUMNS
FROM "12345" 
WHERE TIMEFRAME lastMonth

You can get earlier months by using a named timeframe (lastMonth2, lastMonth3, etc.)

SELECT NoRowHeaders
METRICS fb:page_impressions ON COLUMNS
FROM "12345" 
WHERE TIMEFRAME lastMonth3

Our Facebook integration will be extended on an on-demand basis, so if there is something you would like to get from Facebook which is not listed in our metrics and dimensions sheet then please contact us.

Facebook Documentation

https://developers.facebook.com/docs/reference/fql/insights/
- Facebook Insights metrics reference
https://developers.facebook.com/docs/reference/api/
- Facebook Graph API
https://developers.facebook.com/tools/explorer/
- Graph API Explorer
https://developers.facebook.com/blog/post/573/
- Page Insights