问题
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