wall

wall.getComments

The translation was generated automatically and may contain mistakes

Returns the comment list to the wall entry.

To call this method, you can use:
• user access token (access right required: wall — this is issued in exceptional cases by a request to support at devsupport@corp.vk.com)

Parameters

owner_id

integer

The page owner’s ID (user or community).

Note the community ID in the parameter owner_id It is necessary to indicate the sign "-" - for example, owner_id = -1 corresponds to the community identifier VKontakte API (club1)

post_id

positive

The record ID on the wall.

need_likes

checkbox

1 - return information about likes.

start_comment_id

positive

The comment ID, starting with which you need to return the list (see details below).

offset

integer

The shift required to produce a specific sample of results.

count

positive

Число комментариев, которые необходимо получить. По умолчанию: 10 , maximum value: 100 .

sort

string

Order of comments. Possible values:

  • asc From old to new;
  • desc From new to old.
preview_length

positive

The number of characters by which you need to cut the text of the comment. Specify 0 if you don’t want to cut the text.

extended

checkbox

1 Additional fields will be returned.. profiles and groups containing information about users and communities. By default,, 0 .

fields

string

Список дополнительных полей для profiles and community Communities which must be returned. Note that this parameter is only taken into account when extended = 1 .

comment_id

positive

Identifier of the comment whose branch needs to be received.

thread_items_count

integer

Maximum number of elements in the field thread .

If a parameter has been passed start_comment_id , the comment position in the list (or the one closest to it earlier) will be found.. From this position will be returned.. count comments. Displacement offset in this case, it will be counted from this position (it can be negative).

Result

After successful execution, it returns an object containing the number of results in the field count and array of objects comments in the field items as well as fields:

  • current_level_count ( integer The number of comments in the thread.
  • can_post ( boolean ) — whether the current user can leave comments in this thread.
  • show_reply_button ( boolean ) — whether you need to display the “reply” button in the branch.
  • groups_can_post ( boolean ) — whether communities can leave comments in the thread.

If a parameter has been set need_likes = 1 , the comment objects return an additional field likes containing an object with fields:

  • count Number of users who liked the comment.
  • user_likes — the presence of the “I like” mark from the current user ( 1 - there is, 0 - No..
  • can_like — information about whether the current user can put a mark “I like” ( 1 - maybe, 0 - can't).

If a parameter has been passed start_comment_id The field will also be returned. real_offset - the final offset of this subset of comments (it can be negative if it was indicated negative offset ).

If a parameter has been set extended = 1 returns the number of results in the field count Separate array of objects comments in the field items , users in the field profiles and community Communities in the field groups .

Error codes

212
Access to post comments denied

Common errors may occur during execution

Linked versions

Go to API versions page

A parameter has been added to the methods that return comments start_comment_id , which indicates the initial comment for a return.