Documentation Index
Fetch the complete documentation index at: https://learn.social.plus/llms.txt
Use this file to discover all available pages before exploring further.
Query Reactions
Retrieve comprehensive reaction data to analyze user engagement, build analytics dashboards, and understand community sentiment. ThegetReactions method provides detailed information about reactions across all content types with powerful filtering and pagination capabilities.
Architecture Overview
Key Features
Comprehensive Queries
Query reactions across posts, stories, comments, and messages
Advanced Filtering
Filter by reaction type, user, time range, and custom criteria
Real-time Updates
Live reaction data synchronization and automatic updates
Analytics Ready
Built-in aggregation and analytics for engagement insights
Query Parameters
referenceType
referenceType
Type:
ReactionReferenceTypeRequired: YesDescription: Specifies the type of content to query reactions for.Valid Values:POST- Query reactions for postsSTORY- Query reactions for story contentCOMMENT- Query reactions for commentsMESSAGE- Query reactions for messages
referenceId
referenceId
Type:
stringRequired: YesDescription: Unique identifier of the content to query reactions for.Example: "post_123", "comment_456"reactionName
reactionName
Type:
stringRequired: NoDescription: Optional filter to query only specific reaction types. If omitted, returns all reaction types.Example: "like", "love", "angry"limit
limit
Type:
numberRequired: NoDescription: Maximum number of reactions to return. Default varies by platform.Range: 1-100 (platform dependent)sortOrder
sortOrder
Type:
SortOrderRequired: NoDescription: Sort order for returned reactions.Options: NEWEST_FIRST, OLDEST_FIRSTReaction Data Model
Each reaction query returns rich data including:| Property | Type | Description |
|---|---|---|
| reactionId | string | Unique reaction identifier |
| reactionName | string | Type of reaction (e.g., “like”, “love”) |
| reactorId | string | ID of the user who reacted |
| reactorDisplayName | string | Display name of the reactor |
| createdAt | DateTime | When the reaction was created |
| metadata | object | Additional reaction metadata |
Implementation
- iOS
- Android
- TypeScript
- Flutter
Reaction Aggregates
Each content item provides built-in reaction aggregate data:reactionsCount
reactionsCount
Type:
numberDescription: Total number of reactions on the content, regardless of type.Use Case: Display overall engagement metrics and popularity indicators.myReactions
myReactions
Type:
string[]Description: Array of reaction names that the current user has added to the content.Use Case: Highlight user’s own reactions in the UI and enable toggling.reactions
reactions
Type:
Record<string, number>Description: Map showing count of each reaction type on the content.Example:Live Reaction Updates
- Real-time Subscriptions
- Event-based Updates
- Polling Strategy
Subscribe to live reaction updates for real-time UI synchronization:
Analytics & Insights
Engagement Metrics
Track reaction rates, popular content, and user engagement patterns
Sentiment Analysis
Analyze reaction types to understand community sentiment and mood
User Behavior
Identify most active reactors and engagement leaders
Content Performance
Measure which content types and topics generate most reactions
Engagement Analytics Example
Best Practices
Performance Optimization
Performance Optimization
- Implement pagination for large reaction lists
- Use reaction aggregates instead of full queries when possible
- Cache frequently accessed reaction data
- Implement efficient filtering and sorting on the client side
User Experience
User Experience
- Show loading states during reaction queries
- Implement optimistic updates for better responsiveness
- Display reaction summaries before detailed lists
- Provide filtering options for different reaction types
Data Management
Data Management
- Regularly refresh reaction data for accuracy
- Handle real-time updates gracefully
- Implement proper error handling and retry logic
- Use appropriate data structures for reaction storage
Analytics Integration
Analytics Integration
- Track reaction query patterns for insights
- Monitor popular content and engagement trends
- Analyze reaction velocity and patterns
- Implement A/B testing for reaction features
Error Handling
Common Error Scenarios
Common Error Scenarios
- Network Failures: Handle offline scenarios and poor connectivity
- Invalid References: Non-existent content or invalid IDs
- Rate Limiting: Too many queries in a short period
- Permission Errors: Insufficient access to reaction data
Error Recovery Strategies
Error Recovery Strategies
- Implement exponential backoff for failed queries
- Cache successful results for offline scenarios
- Provide fallback UI when queries fail
- Show appropriate error messages based on error type