Newer Version Available
Get Community-Specific Feed Elements from a Feed
Display a user profile feed that contains only feed elements that are scoped to a
specific community. Feed elements that have a User or a Group parent record are scoped to communities. Feed
elements whose parents are record types other than User or Group are always visible in all
communities. Other parent record types could be scoped to communities in
the future.
This example calls getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam, filter) to get only community-specific feed elements.
1ConnectApi.FeedElementPage fep = ConnectApi.ChatterFeeds.getFeedElementsFromFeed(Network.getNetworkId(), ConnectApi.FeedType.UserProfile, 'me', 3, ConnectApi.FeedDensity.FewerUpdates, null, null, ConnectApi.FeedSortOrder.LastModifiedDateDesc, ConnectApi.FeedFilter.CommunityScoped);