1
votes

Using Facebook Graph API, I want to get that all comments that presents in a page and filter them based on datetime. I've read this thread, but it doesn't help as expected.

I can get all post and limit using date for specific page e.g.:

graph.facebook.com/110432309005026/tagged?since=<unix timestamp>

Now I want to do the same to search all comments. This is how I do so far:

graph.facebook.com/110432309005026/tagged?fields=comments{id,from,message,created_time}

But how to filter the date of comment (not the date of post) ? For example, I want to get all comment since '2015-04-25 00:00:00' for all posts on my page.

Need your advice

1

1 Answers

1
votes

You can't do what you are looking for exactly however, what you could do is also look into just filtering the posts returned by the /tagged endpoint using the since parameter.

Since you are only looking for comments from a certain date when you fetch the posts from a certain date then the comments can ONLY be from that date. Your request will look like this instead:

graph.facebook.com/110432309005026/tagged?fields=comments{id,from,message,created_time}&since=2015-04-25