1

I've looked through Facebook Graph API documentation and a few related topics such as this, this and even this. However I haven't found any solution.

I'm trying to analyse comments from this post. As you can see there are dozens of comments under that post. What I want to achieve is that I want to be able to retrieve some number of comments by giving start/end dates to request. For instance, by giving an HTTP request with parameter since=1375315200 (unix time) I expect to get all comments staring from 2013-08-01 (which is 1375315200 in unix time). However the following HTTP request:

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}"

Gives me the wrong result:

 {
  "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 }
}

Why does this result contain entries before 2013-08-01 (timestamps are less than 1375315200)? Shouldn't that timestamps be later than 2013-08-01 (timestamps are greater than 1375315200)? Is there any ideas/solutions how to do about this issue?

Community
  • 1
  • 1
Roman Dryndik
  • 1,167
  • 1
  • 13
  • 34
  • How do you know since is created_time? In your result it doesn't look sorted by created_time – WizKid Apr 03 '16 at 22:48

0 Answers0