public List<ConnectApi.FeedItem> getFeedItems()
{
List<ConnectApi.FeedItem> lst = new List<ConnectApi.FeedItem>();
if(!istest)
{
try
{
lst = ConnectApi.ChatterFeeds.getFeedItemsFromFeed(communityId, ConnectApi.FeedType.Record, chatterGroupId).items;
}
catch(Exception ex) { }
}
return lst;
}
———————————————–
Where communityId => Use either the ID for a community, internal, or null.
chatterGroupId => ID of the associated CollaborationGroup.