You need to sign in to do that
Don't have an account?
Amit Kumar Singh 19
How to fetch top chatter group members in a customer community in apex class
Dear All,
I have developed an visualforce page to display chatter group details.
In this page I am displaying top topics using connect API. this is working fine.
On the same page I want to display top members of that specific group (may be on the basis of reputation point).
How to do that ?
Here is the code :
I have developed an visualforce page to display chatter group details.
In this page I am displaying top topics using connect API. this is working fine.
On the same page I want to display top members of that specific group (may be on the basis of reputation point).
How to do that ?
Here is the code :
public class CommunityGroupPage { public ConnectApi.TopicPage topicforgroup{get;set;} List<CollaborationGroup> chatterGroups = new List<CollaborationGroup>(); public CommunityGroupPage() { Id groupid = apexpages.currentpage().getparameters().get('id'); chatterGroups = [SELECT id, Name, NetworkId FROM CollaborationGroup where id =: groupid Limit 1]; String comid = chatterGroups[0].NetworkId; String grpid = chatterGroups[0].Id; topicforgroup = ConnectApi.Topics.getRecentlyTalkingAboutTopicsForGroup(comId,grpid); } }
<apex:repeat value="{!topicforgroup.topics}" var="topicItem"> <div class="media"> <a href = "/customer/_ui/core/chatter/topics/TopicPage?id={!topicItem.id}"> {!topicItem.name} </a> </div> </apex:repeat>