P
P
Pavel Markovnin2010-12-15 00:10:43
JavaScript
Pavel Markovnin, 2010-12-15 00:10:43

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

4 answer(s)
J
JeanLouis, 2010-12-15
@JeanLouis

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.

J
JeanLouis, 2010-12-15
@JeanLouis

It's my pleasure.

P
Pavel Markovnin, 2010-12-15
@Markovnin

No, the Ajax request to this page cannot be executed, since this is a different domain and crossdomain.xml will not allow this

P
Pavel Markovnin, 2010-12-15
@Markovnin

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 question

Ask a Question

731 491 924 answers to any question