When I access this resource:
https://graph.facebook.com/xxx_yyy/insights
I get this response:
{
"data": [
],
"paging": {
"previous": "https://graph.facebook.com/xxx_yyy/insights?format=json&since=-86400&until=0",
"next": "https://graph.facebook.com/xxx_yyy/insights?format=json&since=0&until=86400"
}
}
The insights data is empty. "xxx_yyy" is a valid post id I got from the feed.
What's causing the API to return an empty insights array?
There are a few requirements for you to get data back from the Facebook Insights graph API call. These don't appear to be clearly documented anywhere, but this is what I have found by trial and error.
The post must be quite old, I was able to dig up something on one of their Ads FAQs that post insights won't be available for 12-15 hours after the end of the day they were posted on.
"Page post metrics will be available 12 to 15 hours after the end of the day the post was made. Metrics are logged on Pacific Standard Time." Page Post Metrics FAQ -Ads and Business Solutions
FB documentation on page post insights is available primarily in this Facebook blog post
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With