Originally created by: xerz-one
Trying to upload a video results in failure. Using the following code:
StatusUpdate tweet = new StatusUpdate("some text");
tweet.setMedia(video);
twitter.updateStatus(tweet);
where video is a File variable, returns the following error:
SEVERE: null
403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
message - Error creating status.
code - 189
Relevant discussions can be found on the Internet at:
http://www.google.co.jp/search?q=2fc5b7cb or
http://www.google.co.jp/search?q=10c2a80b
TwitterException{exceptionCode=[2fc5b7cb-10c2a80b], statusCode=403, message=Error creating status., code=189, retryAfter=-1, rateLimitStatus=null, version=4.0.7}
The issue is not reproducible with images, only with videos (tested MP4+H.264 only), regardless of whenever they had an audio track, their size or length.
Originally posted by: diekuehlung
The video you are trying to upload is to big.
Choose a video file stored on your computer and click Open. You’ll be prompted if the video isn’t in a supported format. Maximum file size is 512MB for TweetVideo, but you are able to upload a video longer than 2 minutes and 20 seconds, and trim it before including the video in a Tweet
Source: https://help.twitter.com/en/using-twitter/twitter-videos
Originally posted by: xerz-one
I can grant you, a trivially small video (I'm talking 1MB or less) would still not do it.
Originally posted by: thatshawt
Use
StatusUpdate.setMediaIds(long... mediaIds)instead ofStatusUpdate.setMedia(File file)