I’m looking to see if it’s possible to pull data from individual posts; listed below. I’m looking to pull this data daily for a business page. From the daily data I want to make a weekly report comparing the last weeks set of data.
The data I’m looking to get is:
- Activity / How many times was each indidual post viewed
- Posts that lead to a subscription / like
- Posts that lead to unsubscribe / unlike
- The number of people that have hidden an individual post
Facebook provides api access to the Insights of a page (or application).
You have two ways to access it: the Insights object or the Insights fql table.
Using that you can load statistics about your page using specific metrics, in the fql table doc. the ones that you care about (based on your question) starts in Page Posts and then you have Stories and People talking about this, Impressions and Engagement.
According to the fql table doc:
Which means that you won’t be able to just run a program once a day to collect this data since you’ll need an active token for a user that has access to the insights data for the page and has authorized your app and granted the “read_insights” permission.
You can make sure that the user use your app while you authenticate him using the Server-Side auth flow, which will results in 60 days token, save that and you can run that program daily for the next 60 days.
When the token has expired the user will have to again use your app to authenticate and create a new valid token.