Publish a Slideshow on a Facebook Page

This guide shows you how to publish a slideshow of images on a Facebook Page using the Video API from Meta.

Create A Slideshow

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.

Image Formats

JPG, JPEG, PNG, BMP, ICO

Image Dimensions

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.

Requirements

  • The request must include a minimum of 3 images and a maximum of 7.
  • Each image must be 10MB or less.

Request Syntax

POST /v20.0/{page-id}/videos
  ?access_token={access-token}
  &slideshow_spec={slideshow-spec}

Required Parameters

Parameter Description

access_token

A Page access token

slideshow_spec

An object containing an array of image URLs and properties that describe the video. See Slideshow Object Properties below.

Slideshow Object Properties

Property Description

images_urls
Required

An array containing 3-7 URLs of images to be used in the video's construction.

duration_ms

An integer that indicates the duration in milliseconds that each image should be displayed in the video. Default value is 1750. Value must be greater than 0.

transition_ms

An integer indicating the duration in milliseconds of the crossfade transition between images. Default value is 250. Value must be greater than 0.

Sample Request

curl -X POST \
  "https://graph-video.facebook.com/v20.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.

Sample JSON Response

{
  "id":"277487313407856"
}