How to tweet using Android app?

262 Views Asked by At

In my application, I need to post tweets, how can I do this? I have found a jar but it's constructor is deprecated.

3

There are 3 best solutions below

1
On

if you only need to post; then the links that parag displayed above; twitter4j and winterwell will suffice.

Otherwise you need to take a look at OAuth, which is a pain. that's twitters (and facebook and LinkedIn and so on) "new" way of confirming users and passwords.

http://apiwiki.twitter.com/w/page/22554657/OAuth-Examples would be useful in that case.

Good luck and have fun! :)

0
On

just use a [SEND Intent][1], that way your users can decided what they want to do with your message:

Intent shareIntent = new Intent(    android.content.Intent.ACTION_SEND);
 shareIntent.setType("text/plain");
 shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,”Sharing info");
 shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, ”is very easy this way”);
startActivity(Intent.createChooser(shareIntent, ”Share Track"));
1
On

You can send the appropriate Intent: request for ACTION_SENDand then limit the eligible intents based on a list of known applications packages.