Search code examples
facebooknestedcommentsfacebook-likefacebook-fql

Get number of likes of comments to comments created through fb:comments (site comments)


As described on facebook's developer page here, it is possible to get the comments of comments to a specific webpage by utilizing an FQL similar to this one:

SELECT comments \
FROM comment \
WHERE object_id IN \
   (SELECT comments_fbid \
    FROM link_stat \
    WHERE url ='https://developers.facebook.com/docs/reference/fql/comment/')

Unfortunately, this does not include the number of likes the comments of comments have. It is however possible to get the number of likes the parent comments have using 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 ='https://developers.facebook.com/docs/reference/fql/comment/')

How do I get the number of likes for each nested comment?


Solution

  • Looks like a bug in the API. You should see if it is logged as a bug with Facebook and log it there if you cannot find it.

    As a workaround, using a batch fql script, query each sub-comment's ID to get number of likes.