How can I use the ConnectAPI to like a chatter comment? I'm looking at the likeFeedItem method in the ChatterFeeds class. How do I get the FeedItemId? I'm not seeing a method to get the FeedItemId?
How can I accomplish this?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
there are multiple API to like chatter feed..
A feed contains a collection of feed elements. If you get a feed with something like ConnectApi.ChatterFeeds.getFeedElementsFromFeed(communityId, ConnectApi.FeedType.News, 'me'), the result have a collection of feed elements, and each feed element will have an "id" property -- that's the ID to use in the likeFeedItem or likeFeedElement method call.