I want to upload the Photo on Twitter as like ttweet photo. by Searching on net I got Some Example of the twiiter4j example to tweet the Photo on twitter. but in that example demo I have to enter the static Username and Password to post. I want is to enter and managed the username and password by twitter OAuth and post the photo on twitter... So is there any Demo that can Post the Photo on Twitter using Twitter OAuth?
Asked
Active
Viewed 5,072 times
2

BenMorel
- 34,448
- 50
- 182
- 322

Shreyash Mahajan
- 23,386
- 35
- 116
- 188
-
1Twitter API: https://dev.twitter.com/docs/api/1/post/statuses/update_with_media – Blender Dec 05 '11 at 06:24
-
@Blender: thanks for the reply. But i want any demo example that do like this. – Shreyash Mahajan Dec 05 '11 at 06:30
2 Answers
3
Twitpic is the place where your photos(tweeted on Twitter) are hosted. So once you get the username password for twitpic,you can upload photo to it using below code sample project. It would just upload the photo and gives you the link.so finally you will have to code for posting that link onto twitter as tweet.
Here is the complete project sample: https://github.com/lorensiuswlt/AndroidTwitpic

Hiral Vadodaria
- 19,158
- 5
- 39
- 56
-
1Realy Nice Example that i want. But while i am going to exit from that account and then again login to the twitter, I seems nothing. – Shreyash Mahajan Dec 05 '11 at 09:07
-
You mean,you don't see the tweet you have sent with the image link you got from this example app? or something else? – Hiral Vadodaria Dec 05 '11 at 09:12
-
Yes i dont get tweet. But while i go to twitPic site i show me the Picture i have uploaded. And While i am going to use this example second time i am not able to post the image. why ? – Shreyash Mahajan Dec 05 '11 at 09:31
-
Hmm...I too get nothing on screen for signing in again into twitter once logged out. Else I am able to send as many image as i want through the app once i am signed in. there is no problem at all. – Hiral Vadodaria Dec 05 '11 at 09:35
-
1Yes, Application works fine but if user get signout from there the there is nothing disply in twitter dialog. – Shreyash Mahajan Dec 05 '11 at 10:18
-
Anyway, Thanks for the help. realy a Nice Example. and yes with this example you can not able to see the currently uploaded photo in tweet but you can see it on tweetPic. I have one exmple where you can see the currently uploade photo on both twitter and on tweetPic. – Shreyash Mahajan Dec 05 '11 at 10:20
-
-
let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/5585/discussion-between-idroid-explorer-and-hiral) – Shreyash Mahajan Dec 05 '11 at 10:33
-
I downloded this sample and imported in eclipse but i am getting error in TwitterApp class at line mTwitter.setOAuthAccessToken(mAccessToken); So please help me any one,Thanks in advance – rams Feb 23 '13 at 09:48
2
Whenever you need demo's just do a search on Github. You will be able to see a lot of demo applications from others.
Or maybe this list will have something for you.

blessanm86
- 31,439
- 14
- 68
- 79
-
2My Question is about to post the image on twitter. Even with this example i am not able to post the status on twitter. – Shreyash Mahajan Dec 14 '11 at 10:45
-
If you have any demo example that post image on the twitter with custom text then let me know. Thanks. – Shreyash Mahajan Dec 14 '11 at 10:46
-