Answer the question
In order to leave comments, you need to log in
Display the number of subscribers of the VK page?
Hello.
It is necessary to display the number of subscribers of the personal VK page to the site (to text, html).
I know how to display the number of subscribers in a group (found on the Internet).
Here:
<script>
jQuery(function($){
$.ajax({
url: 'http://api.vk.com/method/groups.getById?gid=65762432&fields=members_count', // вместо 65762432 указываем свой ID
dataType: "jsonp", // тип получаемых данных
success:function(e){
$('#vkontakte_count').html(e.response[0].members_count) // выводим получаемый результат
}
});
});
</script>
<!-- здесь будет отображаться количество подписчиков -->
<span id="vkontakte_count"></span>
<script>
jQuery(function($){
$.ajax({
url: 'http://api.vk.com/method/users.getFollowers?uid=286951361&count',
dataType: "jsonp",
success:function(e){
$('#vkontakte_count').html(e.response[0].count)
}
});
});
</script>
<!-- здесь будет отображаться количество подписчиков -->
Kolichestvo podpischikov <span id="vkontakte_count"></span>
$('#vkontakte_counte').html(e.response[0].count)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question