facebookfacebook-graph-apifacebook-insights

Calculate the total number of Facebook page comments for a month?


I'm attempting to retrieve the total number of comments received by content posted to a Facebook page using the Graph API for Insights. I'm using an access token that has the read_insights permission and am using the following API call:-

http://graph.facebook.com/[pageID]/insights/page_comment_adds/

My understanding is that this will only return me the number of comments added for a single day and that a month period is not available. However, what this returns for me is three days worth of data ending two days ago (so not today's or yesterday's data).

Could someone please help me understand where I am going wrong with this. I don't follow how to retrieve the data for a specific date and the results I am getting are not what I'd expect making it difficult to calculate the month's total.

I'm sure there must be a simpler way of retrieving the information I'm after.


Solution

  • Here it is : http://graph.facebook.com/[pageID]/insights/page_comment_adds?&since=1321192800&until=1321797600

    Numbers are Unix time. You can use http://www.unixtimestamp.com/ to specify your own dates.