Answer the question
In order to leave comments, you need to log in
Friends.get count returns a maximum of 5k items. How to decide?
Good day.
I have this request:
https://api.vk.com/method/friends.get?count=10000&fields=${$fields}&access_token=${$token}&v=5.103
Response
returns only a maximum of 5k items, and without a parameter fields
- I get all 10k. $humans = await data.response.items.filter(function($humans) {
return $humans.last_seen && $humans.last_seen.time > (time() - $1day)
})
Answer the question
In order to leave comments, you need to log in
use offset
set offset=0, count=5000 and get 0-5000.
then you set offset=5000, count=5000 and you get 5001-10000.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question