Answer the question
In order to leave comments, you need to log in
Get the number of likes on the pages of the site?
Good day!
Please tell me how to solve this problem. There is a site with a VKontakte "Like" button on the pages. It is necessary to make the block "Most popular on the site" with a list of articles sorted by likes.
From which side to approach the decision?
Answer the question
In order to leave comments, you need to log in
https://vk.com/dev/likes.getList
Example:
https://api.vk.com/method/likes.getList?type=sitepage&owner_id=2018480&page_url=http://lifehacker.ru/2013/11/11/kogda-pora-brosat-pit/&filter=likes
They did it for themselves, something like this. But I think it's better through the API
$contents = file_get_contents('http://vk.com/share.php?act=count&index=1&url='.$url);
preg_match('/VK\.Share\.count\(1, ([0-9]+)\)/', $contents, $matches);
if(isset($matches[1])){
$counters['vk'] = (int) $matches[1];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question