Reputation: 197
We have been searching for weeks but can't figure out how to upload videos or images with the API to the Media Library.
Eventually we need a video id generated by the upload API to use in our ad creative.
Upvotes: 0
Views: 1861
Reputation: 38
You can make a call to the advideos endpoint like so:
params = {
'file_url': YOUR_URL,
'access_token': YOUR_ACCESS_TOKEN
}
url = "https://graph.facebook.com/v13.0/{act_xxxxxxxxxx}/advideos"
r = requests.post(url, params)
response = r.json()
Upvotes: 1