The Social SDK product also provides functionality for adding and removing reactions on posts. Users can add any number of reactions to a particular post, allowing them to engage with the content in a more expressive and nuanced way. Additionally, users can also remove reactions that they have added to a post, providing greater control and flexibility over their engagement with the content.
The addReaction
function allows users to add a reaction to a post. The function takes the name of the reaction as a parameter, with a maximum length of 100 characters. The reaction name is case-sensitive, which means that "like" and "Like" are treated as two different reactions.
You can add reactions to a given reference through the addReaction
method.
referenceId
- ID of the post or comment respectively.
reactionName
- name of the reaction that you will remove. Reaction name is case sensitive, i.e "like" & "Like" are two different reactions.
The method returns a promise. If the reaction is successfully removed, the method will return true
. Otherwise, it will return false
or an error.
Version 6
Beta (v0.0.1)
Similarly, the removeReaction
function allows users to remove a previously added reaction from a reference. This provides users with greater control over their engagement with the content and allows them to change their mind or update their reaction to the post or comment over time.
You can remove a reaction from a reference by calling removeReaction
.
reactionName
- name of the reaction that you will remove. Reaction name is case sensitive, i.e "like" & "Like" are two different reactions.
referenceId
- ID of the post or comment respectively.
The method returns a promise. If the reaction is successfully removed, the method will return true
. Otherwise, it will return false
or an error.
Version 6
Beta (v0.0.1)