Skip to main content

Reactions Feature

The Reactions feature allows users to express emotions on posts and comments.

Reaction Types

Six reaction types are available:

  1. Like 👍 - Standard like reaction
  2. Love ❤️ - Show love and appreciation
  3. Haha 😂 - Find it funny or amusing
  4. Dislike 👎 - Express disagreement or dislike
  5. Share 🔁 - Share the content with others
  6. View 👁️ - Track views on stories and posts (automatic, not user-initiated)

Reaction Type Details

TypeEmojiDescriptionUse Case
Like👍Standard positive reactionGeneral approval, agreement
Love❤️Strong positive reactionDeep appreciation, love
Haha😂Humor reactionFunny content, jokes
Dislike👎Negative reactionDisagreement, dislike
Share🔁Share actionSharing content with network
View👁️View trackingAutomatic 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

Learn More