You need to sign in to do that
Don't have an account?
Malakai Lavi
Like a chatter post
I wrote a chatter bot that creates a feed item when a certain action takes place.
I want to write code that will "like" certain posts when they are posted.
I would like to do this using an apex class. What is the code that adds a "like" to a feed post?
I want to write code that will "like" certain posts when they are posted.
I would like to do this using an apex class. What is the code that adds a "like" to a feed post?
This is the rest resource to like,
Method is POST
And this is to unlike,
Method DELETE
Get all likes to a feed-item,
Method is GET.
--Akram
Can you give an example of how to use this in an Apex class? I am not familiar with rest.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_ConnectAPI_ChatterFeeds_static_methods.htm#apex_ConnectAPI_ChatterFeeds_static_methods