facebook - 视频和照片的图形 API 上传大小限制

标签 facebook upload size limit photo

我正在开发一个脚本,允许用户将照片上传到之前从他们的帐户中选择的相册。到目前为止一切正常,但我一直在尝试找出图像文件大小方面的 API 限制。我想事先说明用户没有尝试上传 Facebook 无法/不想处理的照片。有什么估计吗?

既然我已经问过并且正在考虑允许用户上传视频,那么视频大小限制是多少?

提前致谢

最佳答案

看起来 Facebook 的图片上传限制更多地与上传图片的宽度和高度有关,而不是纯粹以 kb 或 mb 为单位的文件大小。我从这个 article 获得了以下信息并做了几个实验。

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

在我的实验中,我尝试通过 API 的 {album_id}/photos 端点以 2048px 宽度和 960px 宽度将相同的 2 张图像上传到新创建的相册,但实际上只有 960 像素宽度的照片上传到 facebook .

为了安全起见,建议您的用户将他们上传的照片的宽度限制为最大 960 像素和最大高度 720 像素。

我相信视频也是如此。看这个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.

我不得不自己对此进行一些挖掘。希望这对您有所帮助!

关于facebook - 视频和照片的图形 API 上传大小限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9079376/

相关文章:

java - 如何正确管理 OutputStream 以避免资源泄漏错误

android - 如何解决导致版本更新的 Facebook Audience 网络错误?

facebook - 新的 Facebook 应用程序 - FBML 还是 iFrame?

javascript - 使用jquery异步上传文件的操作

java - 使用 java sdk 将带有用户元数据的大文件上传到 Amazon S3

iphone - 默认 UIPickerView 高度

ios - Facebook 应用邀请对话框无法正常工作

python - 使用 Python 和 Alfresco API 上传文件

css - 提高画质

java - Java Hash Map中可以存储50mb的字符串类型键值对数据吗