Live Reactions

This endpoint allows you to subscribe to real-time reactions to Live Videos.

Creating

This operation is not supported.

Reading

Returns reactions of a Live Video in real-time.

Permissions

To get comments for a Live Video on a User's or Group's timeline, you need:

  • A User access token with the publish_video permission

To get comments for a Live Video on a Page, you need:

  • A Page access token with publish_video and manage_pages permissions

Example

To subscribe to real-time reactions to Live videos, send a GET request to:

https://streaming-graph.facebook.com/{live-video-id}/live_reactions

Sample Request

GET https://streaming-graph.facebook.com/{live-video-id}/live_reactions?
  access_token={access-token}&
  fields=reaction_stream
var source = new EventSource("https://streaming-graph.facebook.com/{live-video-id}/live_reactions?access_token={access-token}&fields=reaction_stream");
source.onmessage = function(event) {
  // Do something with event.message for example
};

Sample Response

{
  "view_id":50309149,
  "reaction_stream":[
    {
      "value":307,
      "key":"LIKE"
    },
    {
      "value":77,
      "key":"LOVE"
    },
    {
      "value":60,
      "key":"HAHA"
    },
    {
      "value":19,
      "key":"WOW"
    },
    {
      "value":3,
      "key":"SAD"
    },
    {
      "value":19,
      "key":"ANGRY"
    }
  ]
}

Fields

FieldDescription

reaction_stream

A key:value list, indicating the number of real-time reactions by type. The possible types are: NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL, and PRIDE.

Notes

Changed reactions will count as a new reaction. For example, if a user likes a video then later loves the video, both LIKE and LOVE will be counted. If a user likes a video, unlikes it, then likes it again, LIKE will be counted twice. These scenarios will result in differing counts of the endpoint versus the UI.

Updating

This operation is not supported.

Deleting

This operation is not supported.

Error Codes

HTTP Response Code Name What To Do

400

Bad Request

Check that the URL structure and parameters are correct

401

Unauthorized

Make sure your app has the right permissions and that the access token is valid.

500

Internal server error

Try again.