Retrieve all comments with FQL by application ID
Asked Answered
F

2

23

We use the facebook comment plugin to have comments on our site.

To moderate those, we use this tool: https://developers.facebook.com/tools/comments

However, we want to build our own tool to moderate those comments, and integrate it to our existing software.

I can't find a proper way of doing this. the only way I found out now after hours of research is this FQL query:

select post_fbid, fromid, object_id, text, time from comment where object_id in (select comments_fbid from link_stat where url ='URL_HERE')

That doesn't work because we have thousands of different URL's and I cant query each of them every time to see if there are any new comments.

I need a way to get all (new) comments by just enter our app_id, domain or something like that

How can I do this?

Fancied answered 26/8, 2011 at 14:39 Comment(1)
Unfortunately, after researching this issue for about a day, I found it is only possible if you have a fixed set of sub-pages you want to fetch comments from. See the answer I posted here: https://mcmap.net/q/586719/-how-to-list-all-comments-in-my-domainProphylactic
I
2

I'm considering doing the same thing- grabbing all user posts for my application. I'm assuming it's a similar task.

For given user, I will scroll through feed and home looking for app posts. For you, you'd go:

`home?fields=comments`
`feed?fields=comments`

And check for "type" and "id" to match your application.

Iggy answered 12/6, 2012 at 18:48 Comment(1)
Anna when you field comments from an object it is just a sample of the comments and likes, not all. you have to query the connection. /post_id/commentsLougheed
D
0

This code queries for all comments xids used by your application:

https://graph.facebook.com/fql?q=SELECT fromid, text, id, time, username, xid, object_id FROM comment WHERE xid IN (SELECT xid FROM comments_info WHERE app_id = {0}) ORDER BY time desc&access_token={1}&format=json
Desorb answered 5/1, 2012 at 8:45 Comment(1)
For new comments this not works. FB: Note: This table contains a mapping of app_id to XIDs used by legacy fb:comments. It does not contain a map for the current comments plugin, which does not use XIDs. linkTablecloth

© 2022 - 2024 — McMap. All rights reserved.