Answer the question
In order to leave comments, you need to log in
How to get the id of the user accounts of the VKontakte group via api using vkscript and the execute method?
waters proper code
var members = API.groups.getMembers({"group_id": "habr", "v": "5.28","count": "1000", "offset": Args.tek }).items;
var offset = 1000;
while (offset < 25000 && (offset+Args.tek) < Args.total ){
members = members + API.groups.getMembers({"group_id": "habr", "v": "5.28", "count": "1000", "offset": Args.tek + offset}).items;
offset = offset + 1000;
}
return members;
Answer the question
In order to leave comments, you need to log in
I hope that it will be useful to someone. I fought myself, then I realized that the arguments in the stored procedure are passed as strings, they must be explicitly converted to integers.
var members = API.groups.getMembers({"group_id": Args.group_id, "v": "5.28","count": "1000", "offset": Args.tek }).items;
var offset = 1000;
while (offset < 25000 && (offset+parseInt(Args.tek)) < parseInt(Args.total)){
members = members + API.groups.getMembers({"group_id": Args.group_id, "v": "5.28", "count": "1000", "offset": parseInt(Args.tek) + offset}).items;
offset = offset + 1000;
}
return members;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question