Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graph API upload size limits for video and photo

I am developing a script that allows users to upload photos to Albums previously selected from their accounts. Everything is working fine so far, but I´ve been trying to find out which is the API limit in terms of image file sizes. I´d like to beforehand that the user is not trying to upload a photo that Facebook can´t/doesn´t want to cope with. Is there any estimation on what would it be?

Since I am already asking and I am considering to allow the user upload videos, what would be the video size limit?

Thanks in advance

like image 990
Efrén Fernández Abeledo Avatar asked Jan 31 '12 12:01

Efrén Fernández Abeledo


1 Answers

It looks as though Facebook's image upload limits have to do more with the width and height of the image being uploaded rather than purely file size in kb or mb. I've gotten the following information from this article and have done several experiments.

This is the maximum size of the image you can upload.

Width: 2048px Height: 2048px

Pinned post picture size

This is the size of the picture of your pinned post. It will not be scaled down, Facebook will take the center of the image and cut it out accordingly.

Width: 403px Height: 403px

Pictures displayed in Facebook Albums

This is the maximum size of the image as shown in slide show or album.

Width: 960px Height: 720px

In my experiments I tried uploading the same 2 images to a newly created photo album at both 2048px width and 960px width via the {album_id}/photos endpoint of the api, and only the 960 pixel width photos actually got uploaded to facebook.

Just to be safe, advise your users to limit the width of their uploaded photos to 960px max and height of 720px max.

Videos I believe work along the same lines. See this help center article

The easiest way to optimize the quality of your videos is to upload HD video.

If you're exporting your video from editing software (ex: Final Cut Pro, Avid, iMovie) we recommend these custom settings:

  • H.264 video with AAC audio in MOV or MP4 format

  • An aspect ratio no larger than 1280px wide and divisible by 16px

  • A frame rate at, or below, 30fps Stereo audio with a sample rate of 44,100hz

Keep in mind that videos must be less than 20 minutes long. The longer your video is, the larger its file size will be. This may affect the quality of the video.

Had to do some digging on this one myself. Hope this helps!

like image 119
Dante Cullari Avatar answered Sep 21 '22 16:09

Dante Cullari