F
F
feed4rz2017-03-24 22:35:24
In contact with
feed4rz, 2017-03-24 22:35:24

How to check if the VK wall is open?

You need to use api to check the openness of the VK wall.
It is desirable to understand this from the response of the users.get request.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2017-03-24
@feed4rz

The users.get() method allows you to specify the can_post field , which indicates whether the current user can post on the wall to users whose ids are specified in the user_ids field of the request.
Most likely, you will want to check the openness of the wall for several users at once. It is convenient to use the execute() method to filter only the data you need. Passing such code to execute(), get back an array of ones and zeros, respectively. the ability to post on the wall of the requested users:

return API.users.get({"user_ids":"12,12345,1234567","fields":"can_post"})@.can_post;

user ids are listed separated by commas. Answer example: it means that users 12 and 1234567 will not be able to post, but 12345 is possible. The order in the response matches the order in the request. For groups, you can find out in the same way, but the groups.get () method is also the can_post field. "response": [0, 1, 0]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question