onPostUnliked( )


An event that is triggered when a post is unliked.

The onPostUnliked() event handler runs when a post is unliked. The received PostUnlikedEvent object contains the postId of the unliked post.

Note: Backend events don't work when previewing your site.

Method Declaration
Copy
function wixBlog_onPostUnliked(event: PostUnlikedEvent): void;
Method Parameters
eventPostUnlikedEvent

Information about the unliked post.

An event that occurs when a post is unliked
JavaScript
export function wixBlog_onPostUnliked(event) { const timeUnliked = event.metadata.eventTime; const postIdUnliked = event.data.postId; console.log("Post unliked", event); } /* Full event object: * * { * "metadata":{ * "id": "", * "entityId": "e65bd5d9-36ca-4388-8064-3d785d0f5460", * "eventTime":"2022-06-16T15:22:49.242Z", * "triggeredByAnonymizeRequest":false * }, * "data":{ * "postId":"e65bd5d9-36ca-4388-8064-3d785d0f5460" * } * } */
Errors

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

Did this help?