This guide shows you how to publish a slideshow of images on a Facebook Page using the Video API from Meta.
Send a POST
request to the Page Videos edge and include an object containing an array of image URLs to be used to construct the video. The images must be hosted on a publicly accessible server. The object should describes how long to display each image and the transition duration between images.
JPG, JPEG, PNG, BMP, ICO
If the images have different dimensions the API will crop and resize them to 600x600 pixels and create a square video. If all of the images are the same dimension the video will match that dimension.
POST /v21.0
/{page-id}/videos
?access_token={access-token}
&slideshow_spec={slideshow-spec}
Parameter | Description |
---|---|
| A Page access token |
| An object containing an array of image URLs and properties that describe the video. See Slideshow Object Properties below. |
Property | Description |
---|---|
| An array containing 3-7 URLs of images to be used in the video's construction. |
| An integer that indicates the duration in milliseconds that each image should be displayed in the video. Default value is |
| An integer indicating the duration in milliseconds of the crossfade transition between images. Default value is |
curl -X POST \
"https://graph-video.facebook.com/v21.0
/1755847768034402/videos" \
-F "access_token=EAADd..." \
-F "slideshow_spec={ \
"images_urls":[ \
'https://socialsizz...1.png', \
'https://socialsizz...2.png', \
'https://socialsizz...3.png' \
], \
"duration_ms": 5000, \
"transition_ms": 200 \
}"
Upon success the API will respond with the ID of the newly constructed Video.
{ "id":"277487313407856" }