Upload video on twitter

自古美人都是妖i 提交于 2019-12-18 02:46:36

问题


I have to upload a video on twitter from android app. I have successfully uploaded image and text on twitter. I am using the twitter4j-core-3.0.3.jar library.

I tried uploading video using the same method I used for images, but failed to upload and got exception code 403 and TwitterException {exceptionCode=[2ea3c142-58dea759], statusCode=403, message=Error creating status., code=189, retryAfter=-1, rateLimitStatus=null, version=3.0.3}.

I also downloaded twitvid sdk from http://twitvid.pbworks.com/w/page/22556292/Client%20Libraries, but even after integrating this sdk, I could not upload video on twitter.

As per twitter official discusion thread https://dev.twitter.com/discussions/11241 we can upload video using twitvid using that code.

Since I am not having a suitable sdk, I am not able to work on this. Any help to upload video on twitter from android app will be highly appreciated.


回答1:


EDIT 2016: This answer is outdated. Twitter now support video upload in addition to linking.

You cannot upload video directly to Twitter - they simply don't support it.

Here's what you have to do, instead.

  1. Upload the video to a 3rd party service (like YouTube)
  2. Get the public URL of the uploaded video
  3. Add the URL to the status you send to Twitter - e.g. "Here is my video http://example.com/video123"

If you want, you can add a thumbnail of the video as an image attachment.




回答2:


Refer this link CLICK HERE Twitter video share this may be useful to others . I have made up a library by extending twitter4j library . Note this is used for only Silent Video share i.e Without using the composer .



来源:https://stackoverflow.com/questions/20681924/upload-video-on-twitter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!