Possible Duplicate:
Can we post image on twitter using twitter API in Android?
I am working in an android application and I want to tweet a message and a picture to twitter. I am able to tweet only tweets to twitter by the code :
String token = prefs.getString(OAuth.OAUTH_TOKEN, "");
String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, "");
AccessToken a = new AccessToken(token, secret);
Twitter twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer(Constants.CONSUMER_KEY,
Constants.CONSUMER_SECRET);
twitter.setOAuthAccessToken(a);
try {
**twitter.updateStatus("New tweet");**
twitter.//Which property of twitter should I use to tweet an image and //message
} catch (TwitterException e) {
// TODO Auto-generated catch block
Log.e("Errorssssssssssssss", e.toString());
}
How do I include an image as well?
refer to http://www.londatiga.net/it/how-to-post-twitter-status-from-android/, use twitter4j library
where mTwitter is an instance of Twitter class
Make sure you are using latest version of twitter4j-core jar file.
U can try example which comes with Twitter4j Library.Following code will help u
Download Twitter4j Library look for more examples there.