You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 13, 2018. It is now read-only.
I've recently started uploading gifs to twitter, and I noticed that it fails randomly (like 1/10 attempts), even with small gifs. I looked into it, and Twitter recommends using the chunked upload endpoint for gifs.
A GIF may fail during Tweet creation even if it is within the filesize limit. Adhere to the following constraints to improve success rates.
Resolution should be <= 1280x1080 (width x height)
Number of frames <= 350
Number of pixels (width * height * num_frames) <= 300 million
In order to get better support for larger GIFs, use the chunked upload endpoint with the media_category parameter. This allows the server to process the GIF file asynchronously, which is a requirement for processing larger files. Pass media_category=tweet_gif to enable async upload behavior for Tweets with an animated GIF.
What do you think about adding a method to support this behavior? It seems like we might be able to refactor Twitter.prototype.uploadVideo into a more generic method (like Twitter.prototype.chunkedMediaUpload) that accepts a media_type argument.
The text was updated successfully, but these errors were encountered:
This should do the trick. Could you please try to upload animated GIFs with the version on the branch "chunkedUpload"? I can't really test it right now.
I've recently started uploading gifs to twitter, and I noticed that it fails randomly (like 1/10 attempts), even with small gifs. I looked into it, and Twitter recommends using the chunked upload endpoint for gifs.
https://dev.twitter.com/rest/media/uploading-media > Animated GIF recommendations
What do you think about adding a method to support this behavior? It seems like we might be able to refactor
Twitter.prototype.uploadVideo
into a more generic method (likeTwitter.prototype.chunkedMediaUpload
) that accepts amedia_type
argument.The text was updated successfully, but these errors were encountered: