I would like to get the insights data from my page on Facebook as can be seen from https://www.facebook.com/USERNAME?sk=page_insights . However I do not know which of these are available through the API, except of “number of fans” and “talking about”.
I have print-screened the insights of my page and posted it as an album for better understanding here: https://i.stack.imgur.com/49Ze1.jpg
Below is all the insights shown on the facebook page, so I will get a clear answer.
Thank you.
*Because the subject is similar to twitter api, how can I get the numbers of retweets made from my statuses each day? (answered)
Total number of fans.
Total number of friends of fans.
Weekly total reach.
People talking about this.
LIKES (https://www.facebook.com/USERNAME?sk=page_insights_likes)
Demographics
Gender
Age
Country
City
Language
Where Your Likes Came From.
New Likes
Unlikes
Like Sources
REACH (https://www.facebook.com/USERNAME?sk=page_insights_reach)
Who You Reached
Genre + Age
How You Reached People.
Reach -> Organic, Paid, Viral, Total
Unique Users by frequency
Visits to your page
Page Views,
Unique Visitors
Total Tab Views
External Referrers
TALKING ABOUT (https://www.facebook.com/USERNAME?sk=page_insights_talking)
Who Is Talking About Your Page
Genre + Age
How people are talking about your page
Talking about this
Viral Search
Information about the insights data available through the Facebook Graph API can be found here.
Note that you require the
read_insightspermission for the page.Here is an example API response (with
read_insights) for a test page I just created. All of the information you posted in the question would be there (except that the page has no users, so there won’t be any proper data).You can test this with one of your own pages using the Graph API explorer:
Use
https://graph.facebook.com/YOUR_PAGE_ID/insights/as the URL.Get an access token with
read_insights(on the ‘Extended Permissions’ tab) checked.