Today we talk about facebook new API upate for Monitoring Comments replies. so as you have noticed facebook introduced threaded comments to posts on fan pages, as you know this Feature is very important and use full for fan pages. it made conversations much more organized, and make more easy way to readable. Just a week after launching comment replies on Facebook, the social network updated its API Wednesday to help brands better monitor and respond to them In a post on its developer blog, Facebook product engineer Alex Madjar says developers can now set up different comment "views" on posts. Using this, you can monitor and respond to comments and replies on your Page.
Updates to the API
Image Source Link
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.
FQL Commands
For Top Level CommentsThe first view of the comments on a post is called "top level". The comments that are on the post (and are not replies to individual comments) are called "top level comments." Top level comments may be ranked, depending on the post and the number of top level comments on that post so far.
SELECT id, fromid, time, text, likes FROM comment WHERE object_id={object_id} AND parent_id='0'
For Replies
SELECT id, fromid, time, text, likes FROM comment WHERE parent_id={comment_id}
For Comments Streams
Another view of the comments on a post is the "stream". The comments "stream" gives all comments (top level and replies to comments) together. The "stream" view provides comments in chronological order, so it's easy for you to just get what's new.
SELECT id, fromid, time, text, likes FROM comment WHERE object_id={object_id} ORDER BY time
"Be the first to express your thoughts"
Post a Comment
Important - Make sure to click the "Subscribe By Email" link below the comment for to be notified of follow up comments and replies.If you use Name/URL don't use keywords as your name. We love to hear from you! Leave us a comment.
To ensure proper display, HTML/XML/JavaScript need to be Encode first using this Encoder Tool Then paste the Encoded code here.