# Audience Targeting



Include and exclude specific audiences from viewing your Live Video.

#### Before You Start

For live videos on a Page, you will need:

* A Page access token requested by a person who can perform the [`CREATE_CONTENT` task](https://developers.facebook.com/documentation/pages-api/overview#tasks) on the Page
* The [`pages_read_user_content` permission](https://developers.facebook.com/docs/permissions/reference/pages_read_user_content)
* The [`pages_manage_engagement` permission](https://developers.facebook.com/docs/permissions/reference/pages_manage_engagement)
* The [`pages_show_list` permission](https://developers.facebook.com/docs/permissions/reference/pages_show_list)
* The [`publish_video` permission](https://developers.facebook.com/docs/permissions/reference/publish_video)

#### Node

* [LiveVideo](https://developers.facebook.com/docs/graph-api/reference/live-video)

## 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.](https://developers.facebook.com/documentation/facebook-login/guides/access-tokens#portabletokens)

```curl
curl -i -X POST \
  "https://graph.facebook.com/v25.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

```json
{
  "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
curl -i -X GET \
  "https://graph.facebook.com/v25.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

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