function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amit Kumar Singh 19Amit Kumar Singh 19 

How to fetch top members of a customer community chatter group in apex class

Dear All,

I have developed a vf page to display chatter group. In this page I am displaying top topics using connect API.
Here is the code :

Apex Class :-
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);

}

}
Visualforce Page :-
<apex:repeat value="{!topic.topics}" var="topicItem">
    <div class="media">
        <a href = "/customer/_ui/core/chatter/topics/TopicPage?id={!topicItem.id}">
           {!topicItem.name}
         </a>                        
     </div>
</apex:repeat>

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 ?