I have succesfully posted images and messages in java application to twitter using twitter4j.jar by refering this link http://javapapers.com/core-java/post-to-twitter-using-java/ , now i am tring to upload video/mp4/chunk to twiiter.
I googled about this topic and found many answers-
Some posts says its not possible yet ,some say its possible through rest API ,some with twitvid API ,some with tweetinvi (http://tweetinvi.codeplex.com/discussions/640413)
My questions are:
1.) Is it possible to upload video to twiter?
2.) If yes,is it possible only through Rest API or(is it possible using twitter.media support jar in twitter4j).
Any suggestion, answer, post regarding this are welcomed and thanked.
2
Answers
I am the developer of Tweetinvi and I can confirm that it is possible to upload a video in chunks with the upload api.
I do not know about Twitter4J apart for its name but you can do an upload by using multi-part webrequests divivded by chunks of up to 5MB.
You can read more about it here : dev.twitter.com/rest/public/uploading-media
The process is the following :
In each of the steps, Twitter will return the media_id in the JSON. After the finalize you can use this media_id for 1 hour and use it as part of a tweet publication.
Cheers,
Linvi
I created a pull request to add this feature in twitter4j. You can look at the implementation here: Adding Chuncked, video upload. This supports async upload of large videos 512mb and 140 sec.