Answer the question
In order to leave comments, you need to log in
Why does time based pagination in Facebook GraphAPI return wrong result?
Faced the following problem. Using the Facebook GraphAPI, I want to extract all the comments from here for later analysis. There are quite a lot of comments on this post (about 50K). I'd like to be able to send HTTP requests with start_date and end_date parameters in order to be able to retrieve comments for a specific time interval.
Facebook GraphAPI provides the so-called time based paging - you can set the time period with the since and until parameters.
What is the problem
I want to get some amount of comments starting from 2013-08-01 (YYYY/MM/DD date format) in unix time this corresponds to 1375315200. By making the following HTTP request, I expect to receive data that has a created_time field greater than 1375315200 :
curl -i -X GET "https://graph.facebook.com/v2.5/10151775534413086/comments?fields=created_time&offset=0&since=1375315200&limit=5&access_token={MY_TOKEN_HERE}"
{
"data": [
{
"created_time": "2013-07-09T14:17:20+0000",
"id": SOME_ID_HERE
},
{
"created_time": "2013-07-09T18:03:17+0000",
"id": SOME_ID_HERE
},
{
"created_time": "2013-07-09T14:13:52+0000",
"id": SOME_ID_HERE
},
{
"created_time": "2013-07-09T14:22:16+0000",
"id": SOME_ID_HERE
},
{
"created_time": "2013-07-09T14:13:26+0000",
"id": SOME_ID_HERE
}
],
"paging": { CURSORS DATA HERE }
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question