A
A
Aydomir Salchak2019-03-16 00:11:10
In contact with
Aydomir Salchak, 2019-03-16 00:11:10

How to display a user from 5,000 people using the VK community API, where is he an administrator?

I'm trying to get it out, but it doesn't work.

function getGroups(){
VK.Api.call('groups.get',{user_id:getC('id'),extended:1,filter:'admin',v:5.78},function(r){
if(!r.error){
if(r.response.count>0){
  
for(i=0;i<r.response.count;i++){
var rs = r.response.items[i];
if(rs.type==='page' || rs.type==='group'){		
VK.Api.call('groups.getMembers',{group_id:rs.id,count:0,v:5.78},function(e){
if(!e.error){
if(e.response.count>5000){
console.log(rs.name+' '+e.response.count);		
}
}
});
}
}	
}
}
});
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serezha, 2019-03-16
@aydomir

If you need to display the communities of the user on whose behalf the api is used:
https://vk.com/dev/groups.get with the parameters filter = admin, fields = members_count, extended =
1 number.
No groups.getMembers is needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question