Stan van der Avoird
Stan van der Avoird

Reputation: 197

Facebook API Upload Video by URL to Media Library

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.

enter image description here

Upvotes: 0

Views: 1861

Answers (1)

OkkeM
OkkeM

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

Related Questions