Include and exclude specific audiences from viewing your Live Video.
For live videos on a Page, you will need:
CREATE_CONTENT
task on the Pagepages_read_user_content
permissionpages_manage_engagement
permissionpages_show_list
permissionpublish_video
permissionTo 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/v21.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.
{ "targeting": { "age_max": 65, "age_min": 17, "geo_locations": { "countries": [ "US", "CA", "MX" ] } }, "id": "<LIVE_VIDEO_ID>" }
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/v21.0
/<LIVE_VIDEO_ID>
?fields=targeting"
On success your app receives a JSON response with a list of audience parameters that have been set.
{ "targeting": { "age_max": 65, "age_min": 17, "geo_locations": { "countries": [ "US" "CA", "MX" ] } }, "id": "<LIVE_VIDEO_ID>" }