How to get the top 3 most liked comments on a Facebook fanpage?
How can I get the top 3 most liked comments on a Facebook fanpage? Here is what I am trying开发者_开发知识库 to do:
- Search all comments on page
x
. - Select
[1,2,3]
fromx
where[1,2,3]
are the most liked comments in descending order. - Output
[1,2,3]
to HTML. - Output my comment to HTML.
Since Fb is bloked at my work I could not test:
SELECT comments
FROM comment
WHERE object_id IN
(
###HERE A QUERY FOR A Fb_id (fanpage/link/video/message/status ...) ###
)
ORDER BY like DESC
LIMIT 0,3;
精彩评论