Answer the question
In order to leave comments, you need to log in
VKontakte, "Like", "Save" and OpenAPI buttons?
Hello everyone,
Is there any way to get the number of users using JavaScript by clicking these buttons for a particular address?
Answer the question
In order to leave comments, you need to log in
Certainly. You can make an ajax request to a page like:
vkontakte.ru/widget_like.php?app=APPLICATION_ID&url=URL_TO_PAGE¬auth=1
For example, for a page:
hh.ru/article.xml?articleId=2070
(like button on
the right) has the form:
vkontakte.ru/widget_like.php?app=1974404&url=http ://hh.ru/article.xml%3FarticleId%3D2070¬auth=1
Upon request, the content of this widget will be returned, from which you need to extract the content of the counter variable, either from html code using jQuery:
Liked by 4 people
There is no direct Open API method.
No, the Ajax request to this page cannot be executed, since this is a different domain and crossdomain.xml will not allow this
Well, everything is clear with server proxies, I just would like to do without them somehow. Thanks
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question