Android twitter image uploading?


In my app i want to upload image via twitter api ? and i have image Url For image…It’s possibe ??


You can upload images to Tweets by using the statuses/update_with_media endpoint:


En kasa Tengo una Energia de Madre taachoo brodeeerr


In My app, I want to upload image in twitter wall using android? please given sample project


TwitterSession twitterSession = new TwitterSession(SendImageActivity.this);
AccessToken accessToken = twitterSession.getAccessToken();

		Configuration conf = new ConfigurationBuilder()                 
		OAuthAuthorization auth = new OAuthAuthorization (conf);
        ImageUpload upload = ImageUpload.getTwitpicUploader (twitpic_api_key, auth);
        Log.d(TAG, "Start sending image...");
        try {
        	url = upload.upload(new File(mPath));
        	result = 1;
        	Log.d(TAG, "Image uploaded, Twitpic url is " + url);	        
        } catch (Exception e) {		   
        	Log.e(TAG, "Failed to send image");
        return result;


suppose my image url is
String path= “

url = upload.upload(new File(path));

When i use like this then failed to upload error message display.

Can anybody have idea that how can I give my image url to above code?


i use twitter4j api to post image to twitter, initially my project worked without any exception but after further development it became unresponsive. Below is the error log form eclipse logcat. Could not validate certificate:
current time: Fri May 10 12:37:38 IST 2013, expiration time: Fri May 10 05:29:59 IST 2013
TwitterException{exceptionCode=[f69e96cd-138ff489 f69e96cd-138ff438 f69e96cd-138ff438 f69e96cd-138ff438 f69e96cd-138ff438], statusCode=-1, retryAfter=0, rateLimitStatus=null, version=2.1.6}

This happened since last night and I cant figure out whether this is due to twitter server error or not.

i want quick reply, very urgent


I have twitter4j-core-3.0.3 in my library but it seems that the filetype ImageUpload is unresolved. I don’t know what library ImageUpload is from. Here is a screenshot:

EDIT: I didn’t know that we should include another import: twitter4j-media-support


In my application I got success message when i post tweet but i didnot get tweet in my account please any one reply me


I am getting the problem that using twitter4j i m unable to upload the image of size more thank 50kb


where I could get the twitpic_api_key? thank you:)