Query Global Feed
Overview
The social.plus SDK provides two powerful approaches for retrieving global feed content: conventional chronological ordering and intelligent custom post ranking. This flexibility allows you to create the optimal content experience for your users based on your application’s specific needs.Feed Query Methods
Conventional Global Feed
Simple chronological ordering with the most recent posts appearing first. Perfect for real-time content streams.
Custom Post Ranking
Intelligent content curation using engagement metrics, time decay, and update boosts for optimal user experience.
Conventional Global Feed Query
ThegetGlobalFeed
method provides a straightforward way to query posts in chronological order, ensuring users see the most recent content first.
The system displays the 20 most recent posts per community in the global feed. Older posts may not be visible to optimize performance and relevance.
Implementation
Custom Post Ranking Query
ThegetCustomRankingGlobalFeed
method provides intelligent content curation using our advanced scoring algorithm. This approach considers engagement metrics, time decay, and content updates to surface the most relevant posts for each user.
Custom post ranking requires SDK version 5.10 or higher. Posts created with earlier versions will not participate in the ranking algorithm.
Implementation
Key Features & Capabilities
Real-time Updates
Real-time Updates
Both conventional and custom ranking feeds support real-time updates, ensuring users see new content as it becomes available without manual refresh.
Efficient Pagination
Efficient Pagination
Pagination support allows for smooth scrolling experiences with large amounts of content while maintaining optimal performance.
Engagement Analytics
Engagement Analytics
Custom ranking queries provide detailed analytics about post engagement, ranking performance, and user interaction patterns.
Flexible Filtering
Flexible Filtering
Configure minimum engagement scores, include/exclude deleted posts, and apply various filters to customize the feed experience.
Performance Considerations
Pagination Best Practices
- Use appropriate page sizes (20-50 posts)
- Implement lazy loading for optimal performance
- Cache results when possible
- Handle pagination state properly
Real-time Updates
- Subscribe to feed updates for live content
- Handle network reconnection gracefully
- Implement proper memory management
- Dispose of subscriptions when done
Error Handling
Best Practices
Query Optimization
- Choose appropriate query type based on use case
- Set reasonable page limits
- Use custom ranking for engagement-focused feeds
- Implement proper caching strategies
User Experience
- Provide loading states during queries
- Handle empty states gracefully
- Implement pull-to-refresh functionality
- Show appropriate error messages
Related Documentation
Custom Post Ranking
Learn about the intelligent ranking algorithm and configuration options
Feed Overview
Understand the different feed types and basic concepts
Posts Query
Explore post querying for User and Community feeds
JavaScript/TypeScript queryAllPosts Method
For JavaScript and TypeScript applications, you can use thequeryAllPosts
method with custom ranking enabled:
The
queryAllPosts
method will throw an error if incorrect parameters are passed. Always validate your parameters and handle errors appropriately.