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?

Somnath Muluk
  • 46,917
  • 28
  • 204
  • 217
  • 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: http://stackoverflow.com/a/10412716/280503 – gardenofwine May 02 '12 at 12:17

2 Answers2

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.

Anna Billstrom
  • 2,394
  • 22
  • 32
  • 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/comments – Shawn E Carter Jun 21 '12 at 15:15
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
Oleg
  • 6,128
  • 3
  • 39
  • 43
  • 4
    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.` [link](https://developers.facebook.com/docs/reference/fql/comments_info/) – neworld Jan 05 '12 at 14:28