You need to sign in to do that
Don't have an account?
How to find the list of user who liked a feed element
Hello,
I want to find who all have liked an element in the chatter feed. I am using Ver 30.
ConnectApi.ChatterLikePage.likes will this work? if not which method i should use.
Thank you
I want to find who all have liked an element in the chatter feed. I am using Ver 30.
ConnectApi.ChatterLikePage.likes will this work? if not which method i should use.
Thank you
//GETTING LIKED LIST OF A FEED
ConnectApi.ChatterLikePage likeList=f.likes;
List<ConnectApi.ChatterLike> l=likeList.likes;
for(ConnectApi.ChatterLike ll:l){
tempUser=new LikedUserDetail();
tempUser.userName=ll.user.name;
tempUser.userID=ll.user.id;
tempuser.userPhotoUrl=ConnectApi.ChatterUsers.getPhoto(commId,tempUser.userID).smallPhotoUrl;
urs.add(tempUser);
system.debug(ll.user.id);
}
All Answers
You can check this link for the same:
http://salesforce.stackexchange.com/questions/49965/chatter-likes-how-to-get-user-likes-per-record
Thanks,
Yaswanth K
//GETTING LIKED LIST OF A FEED
ConnectApi.ChatterLikePage likeList=f.likes;
List<ConnectApi.ChatterLike> l=likeList.likes;
for(ConnectApi.ChatterLike ll:l){
tempUser=new LikedUserDetail();
tempUser.userName=ll.user.name;
tempUser.userID=ll.user.id;
tempuser.userPhotoUrl=ConnectApi.ChatterUsers.getPhoto(commId,tempUser.userID).smallPhotoUrl;
urs.add(tempUser);
system.debug(ll.user.id);
}