Updates to the API
This update comments API now provides developers with different 'views' of the comments on your page. There are three basic views; Top Level Comments, Replies and Comment Streams. These views can be accessed by the Graph API as well as through Facebook's FQL table.
Top Level comments - These are individual comments to the post itself, and not replied to any comment. This view is called "top level". The comments in this view might be ranked on the basis of their quality, replies, and some other factors.
Replies - This view, called "replies" fetches replies to an individual comment of a post.
Comment Streams - "stream" will return all top level comments and their replies in a chronological order, so the top level comments here won't be ranked.
Do you like the new changes? You can read the Facebook Developers Blog for more information, or check out the documentation for this API for detailed instructions. You can also ask us questions in the comments below. Stay tuned :)
Replies - This view, called "replies" fetches replies to an individual comment of a post.
Comment Streams - "stream" will return all top level comments and their replies in a chronological order, so the top level comments here won't be ranked.
FQL Commands
You can get data using both FQL ad Graph API. If you're using existing API, you need to keep in mind that the 'comments' column in the 'stream' FQL table has been depreciated. Instead, use 'comment_info' field to fetch data from 'can_comments' and 'comment_count' fields. Here are the FQL queries for the three views.Top Level comments
SELECT id, fromid, time, text, likes
FROM comment
WHERE object_id={object_id} AND parent_id='0'
Replies
SELECT id, fromid, time, text, likes
FROM comment
WHERE parent_id={comment_id}
Comment streams
SELECT id, fromid, time, text, likes(almost exactly the same as Top level Comments query, but ordered by time, and no check for parent_id being 0;
FROM comment
WHERE object_id={object_id}
ORDER BY time
Missing out on something?
If you're wondering why you don't see threaded comments on your Facebook Fan Page, then that's because Threaded comments have only been enabled for popular pages with a lot of fans (1,000+). If you're not quite there yet, then don't worry. This option will be turned on by default for all pages by June 10.Do you like the new changes? You can read the Facebook Developers Blog for more information, or check out the documentation for this API for detailed instructions. You can also ask us questions in the comments below. Stay tuned :)
If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »