Creates a new comment on a photo.

This method requires the following permissions: photos.

Parameters

photo_id
string

Identifier of the photo on which to comment.

reply_to_comment
string

Identifier of the comment to reply to.

message
string

The text of the comment. Required if there are no attachments. This parameter supports formatted text, the format is determined by the text_format parameter.

text_format
enum

The format of the comment text passed in message. By default, the user’s preference is used.

Possible values: markdown, html, plain.

attachments
array of objects

JSON array representing the media attachments to be added to this post. See the separate page for the object description. Required if there is no message.

content_warning
string

If this is not empty, make the content of the comment hidden by default, requiring a click to reveal. This text will be shown instead of the content.

guid
string

A unique identifier used to prevent accidental double-posting on unreliable connections. If photos.createComment was previously called with this guid in the last hour, no new comment will be created, the ID of that previously created comment will be returned instead. Recommended for mobile apps.

Result

The identifier of the newly created comment.

Errors

Global errors may occur when calling this method.