Developers » API methods » Wall » wall.createComment
Wallwall.createComment
Adds a comment to a post on a user wall or community wall.
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: wall.
This method can be called with a community token. Access rights required: wall.
Parameters
owner_idUser ID or community ID. Use a negative value to designate a community ID.
int (number), current user id is used by default
post_idPost ID.
positive number, required parameter
from_groupID of the community from which name the comment will be created.
positive number
message(Required if attachments is not set.) Text of the comment.
string, string
reply_to_commentID of comment to reply.
int (number)
attachments(Required if message is not set.) List of media objects attached to the comment, in the following format:
<type><owner_id>_<media_id>,<type><owner_id>_<media_id>

<type> Type of media object:

photo photo
video video
audio audio
doc document

<owner_id> ID of the media owner.
<media_id> Media ID.

For example:
photo100172_166443618,photo66748_265827614

list of comma-separated words
sticker_idSticker ID.
positive number
guidUnique identifier to avoid repeated comments.
string
Result
Returns added comment ID in comment_id (integer) field and an array of parent comments in parent_stack (array) field.
Errors
212Access to post comments denied
213Access to status replies denied
222Hyperlinks are forbidden
223Too many replies
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
5.92
wall.getComments method returns new fields: comment_id (integer), current_level_count (integer).
wall.createComment method returns new parents_stack (array) field.
wall.getComment method has been added.

Wall comment object contains new parents_stack (array), thread (object) fields. deleted (boolean) field can be returned if the comment is deleted.

Replies (reply_message) and forwarded messages (fwd_messages) have been separated in the message object.

is_favorite (boolean) field can be returned in , , objects.
5.67
wall.createComment method supports community ID in from_group parameter.

chat object has no users array if it is empty.