I’m developing a website that connects to Facebook. The website uses the comments social plugin to allow the users comments the content of each page from the site. Now I’m looking for a way to query the most commented pages, but looking the FQL documentation I didn’t found any way of count records nor get the most popular urls from my website.
If someone have some clue to accomplish that task I would be thankful.
Two options
OPTION 1
FQL the comments table: http://developers.facebook.com/docs/reference/fql/comment/
To process multiple URLs at a time you can run a FQL multi-query.
OPTION 2
Another option is to keep a running count of number of comments in your database. The comments plugin allows you to capture when someone leaves a comment. You can then increment a counter in your database for that url.
From: https://developers.facebook.com/docs/reference/plugins/comments/