Live Reactions

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

Creating

This operation is not supported.

Reading

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

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

You must include a valid user access_token with the appropriate permissions and any fields you want to receive.

Sample Subscription Request

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

Sample Real-Time Update

[
  { "reaction_stream": [
      { "NONE": 0,
        "LIKE": 5,
        "LOVE": 2, 
        "WOW": 1,
        "HAHA": 8,
        "SAD": 0,
        "ANGRY": 0,
        "THANKFUL": 0,
        "PRIDE": 0 } ] }
]

Permissions

  • A valid user access token
  • For User videos, the user_videos permission.

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.

This endpoint counts all reactions, including users who change their reactions. For example, if a user LIKEs a video then changes to LOVE 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.