You first have to enable July Breaking Changes
from your app advanced settings
Then use the fields
parameter with the comments
graph API and include the parent.field(id)
column with the and also the filter
parameter with the stream
value. the final result :
{POST_ID}/comments?filter=stream&fields=parent.fields(id),message,from,likes
this should return both comments and replies with the parent
element which has the comment id that the reply belongs to
-- update
and for better array arrangement for replies you can use the following to merge replies with the actual comment array you can include comments.summary(true)
in the fields parameter
{POST_ID}/comments?limit=0&filter=toplevel&fields=comments.summary(true),message,from,likes
filter parameter is optional
for more info about the fields : http://developers.facebook.com/docs/reference/api/Comment/
and in case you want to do it in FQL, check this post's comments http://developers.facebook.com/blog/post/2013/04/03/new-apis-for-comment-replies/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…