I can not find a method or a parameter in a method that allows to find out whether comments are open in a group / public or not. How to do it?

    1 answer 1

    There is no direct method in the API, but a little detour can do this: get, for example, the latest (in the latest sense) post on the wall of this group (for example, using the wall.get method) and check the can_post field at the response in the comments object or 1. can_post - information on whether the current user can post on the community wall.

    A quick example through the execute query:

     return API.wall.get({owner_id:-1}).items[0].comments.can_post; // вернет 0 // return API.wall.get({owner_id:-10502438}).items[0].comments.can_post; // вернет 1