Reactions Feature
The Reactions feature allows users to express emotions on posts and comments.
Reaction Types
Six reaction types are available:
- Like 👍 - Standard like reaction
- Love ❤️ - Show love and appreciation
- Haha 😂 - Find it funny or amusing
- Dislike 👎 - Express disagreement or dislike
- Share 🔁 - Share the content with others
- View 👁️ - Track views on stories and posts (automatic, not user-initiated)
Reaction Type Details
| Type | Emoji | Description | Use Case |
|---|---|---|---|
| Like | 👍 | Standard positive reaction | General approval, agreement |
| Love | ❤️ | Strong positive reaction | Deep appreciation, love |
| Haha | 😂 | Humor reaction | Funny content, jokes |
| Dislike | 👎 | Negative reaction | Disagreement, dislike |
| Share | 🔁 | Share action | Sharing content with network |
| View | 👁️ | View tracking | Automatic tracking (not user action) |
Note: The View reaction type is used internally by the system to track views on stories and posts. Users cannot manually add a "View" reaction - it's automatically recorded when content is viewed.
Adding Reactions
React to a Post
The Reactions API uses api/Reaction or post-specific endpoints (api/Post):
POST /api/Post/{postId}/reactions
Authorization: Bearer {token}
Content-Type: application/json
{
"type": "like"
}
React to a Comment
POST /api/Reaction // or comment-specific endpoint
{
"targetId": "comment-id",
"targetType": "Comment",
"type": "love"
}
Managing Reactions
Change Reaction Type
Post a new reaction type to replace the existing one:
POST /api/Post/{postId}/reactions
{
"type": "love"
}
Remove Reaction
DELETE /api/Post/{postId}/reactions
Viewing Reactions
Get Post Reactions
GET /api/Post/{postId}/reactions?requestingUserId={userId}
Response includes:
- Total count per reaction type
- List of users who reacted
- Current user's reaction (if any)
Reaction Statistics
The system tracks:
- Total reaction counts
- Reaction distribution
- Most popular reaction types
- Reaction trends over time