Answer the question
In order to leave comments, you need to log in
Vkontakte API likes.getList
Greetings. I just can't put my task on the shoulder blades. The task is to programmatically get the number of likes on some pages of a certain category. I use: APIServerPHPClass.zip
But "Invalid item id or page url" keeps coming back to me.
Who won, please share.
require 'vkapi.class.php';
$api_id = XXXXXX;
$secret_key = 'YYYYYYYYYYYYYYY';
$VK = new vkapi($api_id, $secret_key);
$resp = $VK->api('likes.getList', array(
'type'=>'sitepage', 'item_id'=>'http://example.com/cat/page1.html', 'page_url' => 'http://example.com/cat/page1.html'
));
print_r($resp);
Answer the question
In order to leave comments, you need to log in
Look, everything is simple:
test.megor.ru/
$resp = $VK->api('likes.getList', array(
'type'=>'sitepage', 'owner_id'=>'1992711', 'page_url' = > 'http://wpnew.ru/udobnaya-rabota/knopka-v-kontakte-mne-nravitsya.html'
));
The chip in the owner_id is the id of the site / application to which the like is attached
vkontakte.ru/developers.php?oid=-1&p=Like when you register numbers in the code, this is it.
I hope that helped. Good luck.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question