Facebook-graph-api – How To Get Historical “Facebook Page Likes” Data via Graph API or FQL

facebook-fqlfacebook-graph-api

Was wondering if anyone knows how to get the historical data for any Facebook Page.

For example, number of fans for RedBull fan page on a given day in the past or for a given period that ends today so that I can show fan development of any page over a given period.

I tried it with the graph API and FQL (insights) but no luck.

https://graph.facebook.com/{USERNAME}/insights?fields=likes&period('week')&end_time_date('2011-06-26') –> empty result

Pulling the data via FQL also returns no results, plus it seems without a read_insights permission nothing is possible for page data

I'd need this to be available with only a generic user access token. This data is publicly available anyway. Result should be somewhat like this: http://www.socialbakers.com/facebook-pages/australia/

Best Answer

https://graph.facebook.com/{{pagename}}/insights/page_views?access_token={{access_token_key}}&since=1420070400&until=1421625600

Since & until parameter in the above code takes in unix time. add necessary information in the {{ }} and this code should work.

Related Topic