onCommentLiked( )


A backend event that fires when a forum comment is liked.

The onCommentLiked() event handler runs when an existing forum comment in your site is liked. The received LikedComment object contains information about the comment that was liked.

Note: Backend events are not fired when previewing your site.

Method Declaration
Copy
function onCommentLiked(event: LikedComment): void;
Method Parameters
eventLikedCommentRequired

Information about the forum comment that was liked.

A backend event that occurs when a forum comment is liked
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onCommentLiked(event) { const likedCommentId = event.commentId; console.log("Comment liked"); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?