facebook like button
-
27-09-2019 - |
Question
How to get the number of Likes in facebook like button?
Here is my scenario, I have five like buttons, I want to sort the buttons based on the number of likes. Is it possible?
Solution
You can get number of likes for any URL by running FQL on link_stat
table:
SELECT like_count, url FROM link_stat WHERE url IN("FIRST_SHARE_URL","SECOND_SHARE_URL") ORDER BY like_count
then display buttons in corresponding order.
OTHER TIPS
There is a button_count
settings which once specified, will display the counts to the right of the button.
More Info:
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow