How to unlike a topic or post

Can anyone tell me which api used for to unlike topic or post. I am able to like post from below api: https://{defaultHost}/post_actions.json. Just for testing i am editing

I am also trying to find out from where we can unlike post and what is the meaning of actions_summery id’s?

1 Like

Here is a guide that will help you in this situation:

If you look at the browser network, you can see the request made when you unlike:

DELETE /post_actions/<post_id> :+1:


The action_summary IDs represent the actions on the post:

1: bookmark
2. like
3. flag off-topic
4. flag inappropriate
5. vote
6. flag notify user
7. flag notify moderator
8. flag spam

4 Likes

I observed through reverse engineering that the API URL used for like/unlike was https://dev-forum.curiodigitaltx.com/discourse-reactions/posts/28/custom-reactions/heart/toggle.json with a PUT request. But I am getting below API failed error


Do we need to pass anything on body as well?
can anyone help me.
I am sure my header is correct because rest all get, post apis are working fine.
my header is
const getHeaders = () => {

return {
“Api-Username”: userName,
“Api-Key”: config.API_KEY,
“Content-Type”: “multipart/form-data”,
};
};

ok

With the Reaction plugin, yes, you’re correct about the request.

I don’t think you need the Content-Type here; you don’t need to provide any form data.

1 Like

Do you know how to install Reaction plugin for react native mobile application?

You’d have to rewrite the front end of the plugin in React (if fully native and not using web view)

2 Likes