Syntax

addComment(pageId, comment)

addComment(commentId, comment)

Description

 Posts a comment on the specified page or adds a reply to the specified comment.

Parameters

Parameter name

Type

Required

Description

pageId

numberYesThe ID of the selected page.
commentIdnumberYesThe ID of the comment to reply on.
commentstringYesComment that will be posted on the selected page.

Return type

boolean (true/false)

The return value represents the success of adding the comment. If the routine returns "true" the comment was successfully added.

Example

addComment(11801, "I have added this comment using Power Scripts!");

If 11801 is an id of a page, the routine adds a comment to the page with that ID. If 11801 is an ID of a comment, the routine adds a reply to that comment.

See also