import requests st_title = "xxxxxxx" st_description = "xxxxxxx" params = { 'status': 'LIVE_NOW', 'access_token': "xxxxxxx", 'appsecret_proof': "xxxxx", 'title': st_title, 'description': st_description, "privacy": { "value": "everyone" } } response = requests.post('https://graph.facebook.com/v20.0/me/live_videos', params=params) get_r = eval(response.content.decode())
Gives this error; {'error': {'message': "(#100) privacy must contain a valid privacy 'value'", 'type': 'OAuthException', 'code': 100, 'fbtrace_id': 'AaliCk4WnbUR9fF2-uSJErh'}}
This fixed the error and set privacy to 'EVERYONE' in Python.
import requests, json st_title = "test" st_description = "testing privacy"
params = { 'status': 'LIVE_NOW', 'access_token': xxxxxxxxx, 'appsecret_proof': xxxxxx, 'title': st_title, 'description': st_description, 'privacy': json.dumps({ 'description': 'Everyone', 'value': 'EVERYONE' }) } fb_graph_url = "https://graph.facebook.com/v20.0/me/live_videos"
response = requests.post(fb_graph_url, params)
Try using an uppercased value, if you are trying to publish a user live video
I tried that but didn't work
here what i tried: EVERYONE, FRIENDS, PUBLIC, EVERYBODY, friends everybody, everyone, public,
all of them gives thisberror
Just append the privacy parameter to the endpoint itself:
/live_videos?privacy={'value':'EVERYONE'}
This fix the error but live video privacy still set to only me