Facebook

Facebook Graph API Video Upload

How to upload and publish video to a Facebook Page using the Graph API.

Quick answer

Meta's Graph API takes video two ways: a plain POST /{page-id}/videos (with the file or a file_url) for anything under about 1 GB, and the Resumable Upload API — start, chunked transfers with file_offset resume, finish — for larger files. Through PostGate, create a media resource from a URL or multipart upload, wait for status ready, and attach the media ID to a post.

Meta's Graph API gives you two ways to get a video onto a Page: a plain POST for anything under about 1 GB, and a resumable, chunked upload for anything larger. Both eventually land on the same /{page-id}/videos edge; the difference is how many round trips it takes to get the bytes there.

01

Non-resumable vs. resumable upload

For a small file, one POST /{page-id}/videos with the video attached (or a file_url Meta fetches itself) is enough. For a larger one, the Resumable Upload API splits the transfer into a start call, one or more chunked transfers, and a finish call — and if a chunk fails partway through, the response includes the file_offset to resume from instead of restarting the whole upload. Meta has also deprecated the old graph-video.facebook.com host — every request now goes to graph.facebook.com.
02

How does PostGate handle this for you?

You don't drive the resumable flow yourself. Create a media resource from a URL or a multipart upload, and PostGate takes care of getting the bytes to Meta correctly for the file's size.
Ingest a video from a URLPostGate API
curl -X POST https://postgate.studio/api/media \
  -H "Authorization: Bearer $POSTGATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://cdn.example.com/campaign.mp4", "filename": "campaign.mp4" }'
03

For a large local file, upload in parts

Reserve a multipart upload with the filename, MIME type, and byte count. Upload each part to its signed URL, then send the returned ETags to the completion endpoint.
Start a multipart uploadPostGate API
curl -X POST https://postgate.studio/api/media \
  -H "Authorization: Bearer $POSTGATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "upload",
    "filename": "campaign.mp4",
    "mime": "video/mp4",
    "bytes": 314572800
  }'
04

Wait for ready, then attach it to the post

Media moves through pending, uploaded, processing, and ready. Once it's ready, attach the returned media ID to a post exactly like a URL.
Publish the uploaded videoPostGate API
curl -X POST "https://postgate.studio/api/posts?profile_group_id=grp_acme123" \
  -H "Authorization: Bearer $POSTGATE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: campaign-video-001" \
  -d '{
    "post": { "body": "Full campaign film, three minutes." },
    "profiles": ["pro_facebook789"],
    "media": ["med_01JXYZ"]
  }'
05

What size and duration can you actually rely on?

Facebook Page video accepts up to roughly 4 GB and about 4 hours of runtime through PostGate. A single post can carry only one video — never a video alongside photos in the same post, since Meta's Graph API has no endpoint for that combination.

Frequently asked questions

When do I need Facebook's resumable video upload?

For anything larger than about 1 GB. Smaller files can go up in one plain POST /{page-id}/videos with the video attached (or a file_url Meta fetches itself). The Resumable Upload API splits a larger transfer into a start call, one or more chunked transfers, and a finish call — and if a chunk fails partway, the response includes the file_offset to resume from instead of restarting the whole upload.

Is graph-video.facebook.com still used for video uploads?

No — Meta has deprecated the old graph-video.facebook.com host. Every request now goes to graph.facebook.com, including video uploads, and both upload methods eventually land on the same /{page-id}/videos edge.

What is the maximum video size and length for a Facebook Page post?

Up to roughly 4 GB and about 4 hours of runtime through PostGate. A single post can carry only one video — never a video alongside photos in the same post, since Meta’s Graph API has no endpoint for that combination.

How do I upload a large local video file through PostGate?

Reserve a multipart upload with the filename, MIME type, and byte count, upload each part to its signed URL, then send the returned ETags to the completion endpoint. The media resource moves through pending, uploaded, processing, and ready — once it is ready, attach the returned media ID to a post exactly like a URL, and PostGate drives Meta’s upload flow correctly for the file’s size.

Build it with PostGate

One API for every social platform your customers care about — sandboxed, documented, and ready today.

Start building Read the docs