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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With