5

I am trying to use the graph api with limit and since

I think the highest limit is 5000, so I am using that ( I want to make the fewest calls).

I am also trying to look 1 month back.

So I try:

https://graph.facebook.com/[ID of page]/feed&access_token=[accesstoken]&limit=5000&since=11-12-24

and I get 207 results, and the earliest date is december 24th, this is all fine, its saying hey there are only 207 results in the last month. The problem is there is a next link that has:

"next": "https://graph.facebook.com/[id of page]/feed?limit=5000&until=1324702511"

If I get this page, I start getting posts beore december 24th.

So my question is, how can I be sure I get all posts after a given date with fewest calls???

The kludge I am thinking of is to set the since on the first call to 1 day before, then if I get a post with that date, I know I got them all, if not I paginate... 5000 posts in one month is a lot, but I think its possible...

It seems like facebook should provide a way to get since with highest limit possible...I read this http://developers.facebook.com/blog/post/478/ but im still confused.

Joelio
  • 4,621
  • 6
  • 44
  • 80
  • I faced the same issue with you. There is alway paging when calling **Facebook Graph**, I think So, I parsed the **until** value in **next**, then compare with time in **since**. If **greater** then break. – Phat H. VU Dec 26 '13 at 08:51

0 Answers0