onPostUnliked( )


A backend event that fires when a forum post is unliked.

The onPostUnliked() event handler runs when a like is removed from a forum post in your site. The received UnlikedPost object contains information about the post that was unliked.

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

Method Declaration
Copy
function onPostUnliked(event: UnlikedPost): void;
Method Parameters
eventUnlikedPostRequired

Information about the forum post that was unliked.

A backend event that occurs when a forum post is unliked
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onPostUnliked(event) { const unlikedPostId = event.postId; console.log("Post unliked"); }
Errors

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

Did this help?