If you notice spam from site visitors, you can turn off guest commenting to allow only site members to comment.
To restrict commenting to members only, call Update Category to modify permissionsSettings.createComment.role
and permissionsSettings.createReply.role
to "MEMBER"
.
You can retrieve recent comments written across all blog posts or product pages. Use this to display recent activity to site visitors.
Call Query Category to retrieve a list of categories available for a site and find the categoryId
for the category you want to highlight.
Call List Comments By Resource with the categoryId
retrieved above as the contextId
and commentSort.order
set to "NEWEST_FIRST"
.
Allow any site visitor to leave a comment on any product page, but restrict replies to these comments to only site administrators.
To restrict these replies, call Update Category and modify permissionsSettings.createReply.role
to "ADMIN"
.