I am using Graph API for getting insights of the page. For that I am using link like :
https://graph.facebook.com/MYPAGEID/insights/page_fans?access_token=MYACCESSTOKEN
This link gives me last three days of json object which is ok, but I want to specify date range in insights. I found end_date in documentation but not found start date.
Did any one know how I specify date range in this.
Updated mobile browser experience. Tap in the top right of Facebook. Tap Pages, then go to your Page. Tap More at the top of your Page, then tap Insights.
On Instagram, you can view your account insights for any time period within the past 90 days. You can choose between the 4 preset timeframe options or select your own custom timeframe. To access account insights, go to your Instagram profile and tap the Insights button.
Keep in mind that you can only access data in Page Insights for the last 2 years, and demographic data, such as age, gender and location, are available in Page Insights once there is data for 100 or more people. Pages categorized as a Community Page don't have Insights.
The date range selector is at the top right of every report except the Real-Time reports. Click the arrow next to the existing date range to open the controls. Select one of the following from the Date Range menu: Custom: Data for your custom date range.
You can use the since and until parameters. For example:
https://graph.facebook.com/MYPAGEID/insights/page_fans?since=2011-01-01&until=2011-05-05&access_token=MYACCESSTOKEN
The only limitation is that you the range you specify cannot include be longer than about 35 days, otherwise you'll get this exception:
OAuthException
(#604) The specified date range cannot exceed 3024000 seconds"
Also see FB's own description of this using these parameters here: http://developers.facebook.com/blog/post/478
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