0

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?

Thanks.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.