How to track social likes count

巧了我就是萌 提交于 2019-12-11 05:45:23

问题


I have the following design of social likes:

Whenever a user hovers over normal social like icon the real social like button appears. When the user clicks on the like, I want the new count be displayed on my normal view. What is the easiest and fastest approach to do so?

I need to implement this for several social networks, not only for facebook.


回答1:


You need to build it on your own. Some sites do this to provide sending data to facebook/twitter/etc due to social plugin includes on its website.

You can access your URL "like" count like this: https://api.facebook.com/method/fql.query?query=select%20%20like_count%20from%20link_stat%20where%20url=%22http://google.com%22

So you will be able to create the "normal" state on your own. On mouse over you will be able to load the social plugins.

This website shows you an other example for handling this: http://www.heise.de/newsticker/meldung/Apple-vs-Samsung-Hohe-Geldstrafe-kein-Verkaufsverbot-Berufung-2136834.html



来源:https://stackoverflow.com/questions/22268969/how-to-track-social-likes-count

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!