Get User Feed
ThegetUserFeed API enables you to query a user’s personal feed posts alongside posts they’ve authored in public communities. This provides a comprehensive view of user activity across the platform.
Overview
Flexible Sources
Query personal posts, community posts, or both with configurable feed
sources
Privacy Aware
Automatically respects user privacy settings and community visibility rules
API Overview
The new feed repository approach uses thegetUserFeed method with configurable feed sources:
Parameters
| Parameter | Type | Description | Default | Options |
|---|---|---|---|---|
userId | String | Target user ID | Required | Any valid user ID |
feedSources | Array | Source types for feed content | ['user'] | 'user', 'community', ['user', 'community'] |
dataTypes | Array | Post content types to include | All types | text, image, video, file, audio, poll, liveStream, custom |
sortBy | String | Sort order for results | 'lastCreated' | 'lastCreated', 'firstCreated' |
includeDeleted | Boolean | Include soft-deleted posts | false | true, false |
includeMixedStructure | Boolean | Include mixed media posts in filtering | false | true, false. When true, posts with mixed media types are included when filtering by dataTypes. See Query Posts - Mixed Media Filtering for details. |
matchingOnlyParentPost | Boolean | Include only parent posts (no replies) | true | true, false |
Feed Source Types
| Source Type | Description | Visibility |
|---|---|---|
'user' | Posts made directly to the user’s personal feed | Based on user’s privacy settings |
'community' | Posts authored by the user in public communities | Public community posts only |
['user', 'community'] | Combined feed showing both personal and community posts | Merged in chronological order |
Implementation Examples
- iOS
- Android
- TypeScript
- Flutter
Privacy and Visibility Rules
Community Posts Visibility
Community Posts Visibility
Public Communities Only: Only posts from public communities are included
in user feeds - Posts from private communities are never shown - Community
privacy changes affect visibility retroactively - Deleted communities remove
all associated posts from user feeds
User Profile Privacy
User Profile Privacy
Privacy Settings Integration: User feed visibility respects profile
privacy - Private profiles: Only followers can see the combined feed - Public
profiles: Anyone can view community posts - Blocked users: See empty state
with filter options still visible
Community Membership
Community Membership
Membership Status: Posts remain visible even after leaving communities -
Left community: Posts remain if community is still public - Community becomes
private: Posts are removed from user feed - Community deleted: All posts
removed from user feed
Moderation Context
Moderation Context
Moderator Indicators: Special badges for community moderators -
Moderator badge shown on posts in communities where user is a moderator -
Badge visibility follows community’s current state - No retroactive badge
removal when moderator status changes
Use Cases
User Profile Feeds
Display comprehensive user activity including personal and community posts
with privacy controls
Community Discovery
Help users discover active community contributors through their post history
Content Aggregation
Aggregate user content from multiple sources for analytics and insights
Moderation Review
Review user activity across personal and community contexts for moderation
decisions
Best Practices
Performance Optimization
Performance Optimization
- Use specific feedSources instead of always querying both
- Implement pagination for users with many posts
- Cache frequently accessed user feeds
- Dispose of live collections when no longer needed
Privacy Considerations
Privacy Considerations
- Always respect user privacy settings
- Handle blocked users appropriately
- Provide clear UI indicators for private vs public content
- Follow platform privacy guidelines
User Experience
User Experience
- Show loading states during feed queries
- Implement pull-to-refresh for real-time updates
- Provide empty states for users with no content
- Use skeleton screens for better perceived performance
Error Handling
Error Handling
- Handle network connectivity issues gracefully
- Implement retry mechanisms for failed queries
- Provide meaningful error messages
- Log errors for debugging without exposing sensitive information
Backward Compatibility: The default behavior (
feedSources: ['user'])
maintains existing functionality. Enable community posts by explicitly setting
feedSources: ['user', 'community'].Privacy Note: Community posts are only included from public communities.
Private community content is never exposed through user feeds, ensuring user
privacy and community security.