开发者

Sort on amount of likes on facebook

开发者 https://www.devze.com 2023-01-01 08:16 出处:网络
I have a site with a bunch of links, the page is also connected to facebook (facebook connect)开发者_如何学C and you can \"like\" the links. I wonder if there is a way to sort on the \"most liked\" li

I have a site with a bunch of links, the page is also connected to facebook (facebook connect)开发者_如何学C and you can "like" the links. I wonder if there is a way to sort on the "most liked" link? The links are stored in my database and of course the liking is stored by Facebook...


I'm not too familiar with liking links, but perhaps you can query the link_stat table. http://developers.facebook.com/docs/reference/fql/link_stat


Here is an even easier method to get likes. It doesn't require that you are logged in to Facebook. I have also made an example of how you can sort them. In PHP though.. :-/ http://www.sundh.com/blog/2010/11/get-likes-on-urls-from-facebook/


  1. You should retrieve your links' Likes Count from facebook by sending url's or by FQL, etc
  2. Store "liking" count in your urls table
  3. Sort your links table ORDER BY -linkcountfield- DESC
0

精彩评论

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