SDK v7.x · Last verified March 2026 · iOS · Android · Web · Flutter
Speed run — just the code
Speed run — just the code
Prerequisites: SDK installed and authenticated. You’ll need a
referenceId (post ID, comment ID, or story ID) and referenceType to attach comments and reactions to.Also recommended: Complete Rich Content Creation first — you need posts to comment on and react to.After completing this guide you’ll have:
- Threaded comments (comments + replies) on any post or story
- Emoji reactions added and removed in real-time
- Reaction counts and comment counts updating live in your UI
Quick Start: Add a Reaction
Use the reactions API to add emoji reactions to posts, comments, stories, and messages:TypeScript
Step-by-Step Implementation
Create a text comment
Use Full reference → Text Comment
referenceType: .post for post comments. Other valid values: .content (stories), .message (chat).TypeScript
Create a reply (threaded comment)
Pass the parent comment’s ID as Full reference → Text Comment
parentId to create a nested reply.TypeScript
Query comments with real-time updates
Use a Live Collection to get comments and subscribe to new additions. Filter by Full reference → Query Comments
filterByParentId to get top-level comments only or a flat list.TypeScript
Add a reaction
Reactions use a single
addReaction() call. Built-in types: like, love, wow, laugh, sad, angry. Custom types are also supported.TypeScript
Remove a reaction
TypeScript
Mention a user in a comment
Pass user IDs and their positions in the comment text to trigger mention notifications.Full reference → Mentions
TypeScript
Connect to Moderation & Analytics
The Admin Console Posts and comments management page gives moderators full visibility into every comment thread — including threaded replies, AI moderation status, and direct action menus.
Flagging abusive comments
Flagging abusive comments
Users can flag comments for moderator review using the same flagging system as posts. Flagged comments appear in the Admin Console moderation queue.→ Content Flagging · Admin Console Moderation
Reaction data & analytics
Reaction data & analytics
Query aggregated reaction counts and per-user reaction data via the SDK. View engagement metrics in the Admin Console analytics dashboard.→ Reactions · Admin Console Social Analytics
Webhook: new comment
Webhook: new comment
Receive
comment.created webhook events to build notification workflows or sync comment data to your own backend.→ Webhook EventsCommon Mistakes
Best Practices
Threading UX
Threading UX
- Limit visible nesting depth to 2-3 levels in the UI — deeper nesting is confusing to users
- Show a “View X replies” collapsed state instead of rendering all replies upfront
- Use
getLatestComment()to show a preview of the most recent comment in feed cards without loading the full comment thread - Sort by
lastCreated(newest first) for fast-moving communities;firstCreatedfor long-form discussion
Reactions UX
Reactions UX
- Display a compact reaction pill with the top 3 reactions and total count
- Show the user’s own reaction as highlighted/selected so they can tap to remove it
- Animate reaction additions — a small bounce or pop goes a long way
- For communities that want positivity-only, restrict available reactions to a custom subset
Performance
Performance
- Paginate comments — load 20 at a time and use
loadMore()on scroll - Unsubscribe comment Live Collections when the user navigates away
- Cache reaction counts client-side and reconcile with server state on resume
Next Steps
Your next step → User Profiles & Social Graph
Engagement is working — now build profile pages, follow/unfollow flows, and friend connections.
Rich Content Creation
Create the posts that comments attach to
Notifications & Engagement
Notify users of new comments and reactions
Content Moderation Pipeline
Handle flagged comments and abusive content