Image Post Java not working


#1

Hi,

I am trying to post an image using http://upload.twitter.com/1.1/media/upload.json api. But I am getting the following error:
The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.

Uploading the image using https://api.twitter.com/1.1/statuses/update_with_media.json works fine.

Could you please provide me a sample implementation for Java to upload media (images/videos) using 1.1/media/upload.json?


#2

I’m surprised you are seeing that error from the media upload endpoint.

Are you using Twitter4J? Have you been able to use the example provided by the author?


#3

Thanks Andy. I was able to solve the problem.