Query Reactions
To further facilitate the management of reactions in your app, the social.plus SDK product includes a getReactions method that allows you to retrieve information about a specific reaction or all reactions on a comment and post.
Using this method, you can fetch detailed information about:
The user who made the reaction.
The timestamp of the reaction.
Any additional metadata associated with the reaction.
This feature helps analyze community sentiment and gain insights into the types of content that resonate with the users.
To query getReactions you'll need to simply provide referenceType and referenceId to query specific types of reactions. For further information regarding reaction reference types, please see - Reaction Reference Type.
The referenceType parameter determines the type of reference for which reactions are queried. Supported values are:
post: Retrieves reactions for a post.story: Retrieves reactions for a story.comment: Retrieves reactions for a comment.message: Retrieves reactions to a message.
To query reactions, provide both the referenceType and referenceId. If you'd like to filter by a specific reaction type, provide the reactionName as well.
To query all reactions for a post:
Query Reaction from Post and Story
Query Reaction from Comment
Each post, comment, message has a set of fields providing detailed info about reactions.
reactionsCount- how many reactions the post hasmyReactions- list of reactions you added to the postreactions- map that tells how many reactions of a certain type a post has
Version 6
Beta(v0.0.1)
Query Reaction from Post
Query Reaction from Comment
Last updated
Was this helpful?