Search code examples
phpfacebooksdkinstagraminstagram-api

Instagram Graph API. Content Publishing. Publishing Videos


I can't find correct video .mp4 format what will be support by Instagram. Any body did something like this? .Supported Video Requirements.

I tried .mp4 ratio 1:1, 4:5, 16:9 in response Unsupported format.

What is means? container for video? Help please

Container: MOV or MP4 (MPEG-4 Part 14), no edit lists, moov atom at the front of the file.

Post video not works. post video to Instagram

1.Use the POST /{ig-user-id}/media endpoint to create a media object container, then(Good)

POST graph.facebook.com/17841407853399454/media?media_type=VIDEO&video_url=https://104.131.59.122/uploads/my_images/gallery_429/im_295_1617796300.mp4

{ "id": "17901610240810878" }

2.Use the POST /{ig-user-id}/media_publish endpoint to publish that container(Error)

POST graph.facebook.com/17841407853399454/media_publish?creation_id=17901610240810878


"error": {
"message": "The video file you selected is in a format that we don't support.",
"type": "OAuthException",
"code": 352,
"error_subcode": 2207026,
"is_transient": false,
"error_user_title": "Unsupported format",
"error_user_msg": "The video format is not supported. Please check the specs for the supported streams format",
"fbtrace_id": "AKJfxH9pUFixA8vGyalKw8z"

Solution

  • My browser refuses to load https://104.131.59.122/uploads/my_images/gallery_429/im_295_1617796300.mp4, because of the untrusted certificate.

    Facebook is strict about proper SSL as well, so you will either have to use a plain HTTP URL, or make your SSL setup use a valid certificate, issued/backed by a trusted authority.