Facebook
Target an Audience - Live Video API - Documentation - Meta for Developers

Audience Targeting

Include and exclude specific audiences from viewing your Live Video.

Before You Start

For live videos on a Page, you will need:

Node

Create a Target Audience

To set a target audience, send a POST to the /id request where id is the LiveVideo ID and set the targeting parameter to an object with a comma separated list of audience parameters.

When testing an API call, you can include the access_token parameter set to your access token. However, when making secure calls from your app, use the access token class.

curl -i -X POST \
  "https://graph.facebook.com/ v20.0 
/<LIVE_VIDEO_ID>
    ?targeting={
      age_min:17, 
      geo_locations:{
        countries:["US","CA","MX"]
      }
    }"

On success your app receives a JSON response with a list of audience parameters that have been set.

Sample Response

{
  "targeting": {
    "age_max": 65,
    "age_min": 17,
    "geo_locations": {
      "countries": [
        "US",
        "CA",
        "MX"
      ]
    }
  },
  "id": "<LIVE_VIDEO_ID>"   
}

Get Target Audience Information

To get a list of audience target information, send a GET request to the /LIVE_VIDEO_ID endpoint with the field parameter set to targeting .

curl -i -X GET \
  "https://graph.facebook.com/ v20.0 
/<LIVE_VIDEO_ID>
    ?fields=targeting"

On success your app receives a JSON response with a list of audience parameters that have been set.

Sample Response

{
  "targeting": {
    "age_max": 65,
    "age_min": 17,
    "geo_locations": {
      "countries": [
        "US"
        "CA",
        "MX"
      ]
    }
  },
  "id": "<LIVE_VIDEO_ID>"       
}
Build a Mobile Site
View Site in Mobile | Classic
Share by: