M
M
MelesMeles2018-09-23 16:59:23
API
MelesMeles, 2018-09-23 16:59:23

How now to check VKontakte profiles for closedness (since August 2018) using VK API methods?

When working with VK API methods, there is a limit on the number of requests to the social network (no more than three per second).
For example, the friends.getMutual method allows you to find out the mutual friends of user A and user B. Then, in order to find out all the common friends of user A with all his friends, it would be necessary to make as many friends.getMutual requests as user A has friends.
Some methods allow you to query lists. Thus, for friends.getMutual it would be possible to pass user A and a list (B, C, D, ...) of his friends and get by with only two (not always, but not the essence) requests.
The problem is as follows: if it is impossible to perform an operation for at least one user from the list, then the entire list is refused by the VC without specifying the "guilty" user. That is, if, for example, some user in the list is deleted/banned (which means that mutual friends cannot be recognized), the friends.getMutual function will not be executed. This problem could be solved by making a users.get request on the list of users, getting information about the banned ones and filtering the list from them. Thus, one additional request had to be made (about 0.34 seconds), but the problem was solved.
And now to the crux of the issue. Now VK has introduced "closed" profiles. And if there is a closed profile in the list, then requests cannot be executed either (the specific profile on which the error occurred is not indicated). But (judging by the documentation) there is no way to know if the profile is closed, that is, when users.get is requested to the list of users, the "closed / not closed" field DOES NOT EXIST, so the list cannot be filtered. So, you need to do users.get to each user and catch the error "30 This profile is private". So, it is necessary to execute again the number of requests equal to the number of users, which will be very long. Moreover, the same result can only be achieved by repeatedly calling the friends.get method.
Actually the question is: the social network itself has not yet completed the functionality after the innovation, or am I missing some method of checking the closedness of the profile?
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stockholm Syndrome, 2018-09-23
@MelesMeles

send requests using the users.get method with version 5.89
yes, this version is not in the documentation, but using it you can get information about the closed profile ("is_closed" field)
5ba7ab63e058f174270866.png

C
Cyril, 2015-05-03
@GSchultz

F12 in chrome (and like everywhere else) opens the console.
If you read the message "Uncaught TypeError: Koloda.shuffle is not a function" then it becomes clear that you are trying to call a function on an array before adding it to the prototype. Rearrange adding the function to the beginning.
PS: And try not to mix Russian and English in the names. If Koloda, then Peretasovat =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question