Answer the question
In order to leave comments, you need to log in
How to process the callback of the "Like" button on the Vkontakte website?
There is a situation: there are several “Like” buttons on the page and you need to perform some action if the user clicked on it, but the standard callback from the Vkontakte API returns only the number of votes, I don’t know why it’s done this way and there seems to be no way to reach the developers.
Please tell me how to process this event in another way.
Answer the question
In order to leave comments, you need to log in
what kind of button do you have? here the generated code is different for each: somewhere it’s just an iframe, somewhere a rather big table with id = “vk_like”, well, you can hang it elementary on what was generated through JQuery
.on('click', function()
{
//код
}
understood, and yes, there are frames everywhere, overlooked.
Do you need to perform a separate action for each button?
Do not process at all. This is done so that the user by clicking on the well-known and understandable “Like” does not subscribe to the mailing list about organ augmentation.
In this case, the solution is to pull vk.com/developers.php?oid=-1&p=likes.getList with different item_id only by timeout. Fortunately, access_token is not needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question