# Live Reaction

**Live Reactions** are interactions that users can perform during a livestream. These reactions can be anything, such as *like*, *dislike*, *love*, etc. The specific reaction types are determined by the client. The SDK provides convenient functions to add and query reactions.

### Create a live reaction

The `createReaction` function within liveReaction repository allows user to create a reaction to a livestream. This function requires following parameters:

* `referenceId` - The target post ID linked with a stream.
* `referenceType` - The referenceType should be 'post'.
* `reactionName` - The name of the reaction that you will add. Reaction names are case sensitive, i.e. "like" & "Like" are two different reactions.
* `streamId` - The streamID that you will add the reaction to.

{% tabs %}
{% tab title="iOS" %}
{% embed url="<https://gist.github.com/amythee/33071f4bf12158964f2d76e2535133f7>" %}
{% endtab %}

{% tab title="Android" %}
{% embed url="<https://gist.github.com/4b6ae9c27fb5b89cb722888583222dfa>" %}
{% endtab %}

{% tab title="Typescript" %}
{% embed url="<https://gist.github.com/4777084c23eedcbe6fba375bf9093d16>" %}
{% endtab %}
{% endtabs %}

### Observe Live Reactions

To observe reactions added to a stream, the `getReactions` requires a post ID of the post linked with the stream.

{% tabs %}
{% tab title="iOS" %}
{% embed url="<https://gist.github.com/amythee/b9e4a51b9384a08a9f5a0bc96bf3e9c6>" %}
{% endtab %}

{% tab title="Android" %}
{% embed url="<https://gist.github.com/2bff57ecb7b0d92ab775ea5753016b36>" %}
{% endtab %}

{% tab title="Typescript" %}
{% embed url="<https://gist.github.com/amythee/63b53fe60a3c3a1846c774080d98ca2a#file-getlivereactions-ts>" %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.social.plus/social-plus-sdk/social/live-reaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
