开发者

Facebook comments plugin: sorting comments by default

开发者 https://www.devze.com 2023-03-20 20:58 出处:网络
开发者_如何学GoBy default the comments are shown by \"social ranking\". Is it possible to set the default value to \"reverse chronological\"?

开发者_如何学GoBy default the comments are shown by "social ranking".

Is it possible to set the default value to "reverse chronological"?

The official docs for social plugins does not mention this option...


If you are using the social plugin given by FB, then i think there is no such option available..

what do u mean by Social ranking?

If you are ready to use FQL then you can try my below suggestion.

Normally all FB data are rendered based on timestamps , so if u want to get the latest comments for a specific page, you can use the FQL query to get desired results..

Sample query

http://www.facebook.com/restserver.php?format=json&pretty=1&method=fql.query&
query=select post_fbid, fromid, object_id, text, time from comment where
object_id in (select comments_fbid from link_stat where 
url ="http://developers.facebook.com/docs/reference/fql/comment/") 
order by time desc


I answered here too: Setting Facebook comments web plugin

It just works if you add the attribute

data-order-by="reverse_time"

to the div provided in the html5 version provided by Facebook.

(sorry for the duplicate answer. I came across here googling, that's why I think is usefull to post it here too)


Sorry for exact duplicate, but it is possible to set the default sorting order to reverse chronological. See my answer here.

0

精彩评论

暂无评论...
验证码 换一张
取 消