Returns comments on a wall post.

This method can be called without an access token.

Parameters

post_id
integer

The identifier of the post.

view_type
enum

How to structure the comments. By default uses the user preference. If no token is used, defaults to flat.

Possible values: threaded, two_level, flat.

offset
integer (non-negative)

Offset into the comments.

count
integer (1..100)

How many comments to return. When view_type is threaded or two_level, how many top-level comments to return.

By default 20.

secondary_count
integer (1..100)

How many replies to return, combined, in all threads, when view_type is threaded or two_level. Ignored for flat.

By default 20.

comment_id
integer

To retrieve a reply thread, the identifier of the comment whose replies you would like to get. Important: if you’re displaying comments as two levels, you need to pass flat to view_type when loading reply threads.

sort
enum

The sort order for the comments.

  • asc – Oldest first
  • desc – Newest first

By default asc.

need_likes
boolean

Whether to return information about likes.

extended
boolean

Whether to return user and group objects related to the comments.

By default false.

fields
string

Comma-separated list of user and group profile fields to be returned. Only has effect if extended is true.

Result

A paginated list of wall post objects extended with the following fields:

profiles
array of Users

If extended is true, an array of users relevant to these comments.

groups
array of Groups

If extended is true, an array of groups relevant to these comments.

view_type
enum

The view type for which these comments are intended. Useful for figuring out the user preference if view_type was not specified explicitly.

Possible values: threaded, two_level, flat.

Errors

Global errors may occur when calling this method.