Query Reactions
Retrieve detailed information about reactions on posts, stories, and comments
Add Reactions
Allow users to express emotions with custom reaction names
Remove Reactions
Enable users to change or remove their reactions
Query Reactions
To further facilitate the management of reactions in your app, the social.plus SDK includes agetReactions
method that allows you to retrieve information about a specific reaction or all reactions on a comment, post, or story.
Using this method, you can fetch detailed information about:
Reaction Details
Reaction Details
- User Information: The user who made the reaction
- Timestamp: When the reaction was created
- Metadata: Any additional data associated with the reaction
- Reaction Type: The specific reaction name or emoji used
Analytics Benefits
Analytics Benefits
- Community Sentiment: Analyze overall reaction patterns
- Content Performance: Identify types of content that resonate with users
- User Engagement: Track how users interact with different content
- Trending Reactions: Discover popular reaction types in your community
Reference Types
ThereferenceType
parameter determines the type of reference for which reactions are queried. Supported values are:
Reference Type | Description |
---|---|
post | Retrieves reactions for a post |
story | Retrieves reactions for a story |
comment | Retrieves reactions for a comment |
message | Retrieves reactions to a message |
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
referenceId | String | Yes | ID of the post, comment, story, or message |
referenceType | Enum | Yes | Type of content being queried for reactions |
reactionName | String | No | Filter by specific reaction type (case-sensitive) |
Add / Remove Reactions
The social.plus SDK provides comprehensive functionality for adding and removing reactions on posts. Users can add multiple reactions to express themselves more expressively and remove reactions for greater control over their engagement.Add Reaction
TheaddReaction
function allows users to add a reaction to a post, comment, story, or message. Users can add any number of reactions to a particular piece of content, enabling more nuanced and expressive engagement.
Key Features
Reaction Naming
Reaction Naming
- Maximum Length: 100 characters per reaction name
- Case Sensitivity: “like” and “Like” are treated as different reactions
- Custom Names: Support for any custom reaction name or emoji
- Unicode Support: Full support for emoji and international characters
Reference Types
Reference Types
- Post: Adds the reaction to a post
- Story: Adds the reaction to a story
- Comment: Adds the reaction to a comment
- Message: Adds the reaction to a message
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
reactionName | String | Yes | Name of the reaction (max 100 characters, case-sensitive) |
referenceId | String | Yes | ID of the post, comment, story, or message |
referenceType | Enum | Yes | Type of content receiving the reaction |
Remove Reaction
TheremoveReaction
function allows users to remove a previously added reaction from a reference. This provides users with greater control over their engagement and allows them to change their minds or update their reactions over time.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
reactionName | String | Yes | Name of the reaction to remove (case-sensitive) |
referenceId | String | Yes | ID of the post, comment, story, or message |
referenceType | Enum | Yes | Type of content where the reaction will be removed |
Case Sensitivity: Reaction names are case sensitive. “like” and “Like” are treated as two different reactions, so ensure exact matching when removing reactions.
Common Reaction Types
Standard Reactions
Standard Reactions
- like: Basic positive reaction
- love: Strong positive emotion
- laugh: Humorous content appreciation
- wow: Surprise or amazement
- sad: Empathetic response
- angry: Strong negative reaction
Emoji Reactions
Emoji Reactions
- 👍: Thumbs up
- ❤️: Heart/love
- 😂: Laughing face
- 😮: Surprised face
- 😢: Sad face
- 😡: Angry face
Custom Community Reactions
Custom Community Reactions
- awesome: Community-specific positive reaction
- helpful: For educational or informative content
- inspiring: For motivational content
- fire: For trending or popular content
- mind-blown: For surprising or impressive content
Best Practices
Reaction Design
Reaction Design
- Consistent Naming: Use standardized reaction names across your app
- User-Friendly: Choose intuitive reaction names that users understand
- Cultural Sensitivity: Consider cultural differences in emoji and reaction meanings
- Moderation: Implement guidelines for appropriate reaction usage
Performance Optimization
Performance Optimization
- Debouncing: Prevent rapid add/remove cycles that could spam the system
- Batch Operations: Group multiple reaction operations when possible
- Error Handling: Implement robust error handling for network issues
User Experience
User Experience
- Visual Feedback: Provide immediate visual feedback when reactions are added/removed
- Reaction Counts: Display reaction counts and types clearly
- User Lists: Show who reacted with what reaction types
Use Cases
Social Feeds
Enable reactions on posts in social media feeds
Content Moderation
Use reaction patterns to identify popular or problematic content
Community Engagement
Foster community interaction through expressive reactions
Content Analytics
Analyze user sentiment and content performance
Gamification
Use reactions as part of engagement and reward systems
Feedback Loops
Gather user feedback on different types of content