Can anyone tel me how to tweet using Android? How can i send tweets using Android?
+2
A:
Check the API available at http://apiwiki.twitter.com/
There is a list of FAQs and examples available there.
Sam
2010-06-14 12:51:07
+1
A:
You want something like this:
mHttpClient = new DefaultHttpClient();
mCredentials = new UsernamePasswordCredentials("username", "password");
mHttpClient.getCredentialsProvider().setCredentials(
new AuthScope("twitter.com", 80, "Twitter API"),
mCredentials);
HttpPost post = new HttpPost("http://twitter.com/statuses/update.xml");
HttpParams params = post.getParams();
HttpClientParams.setCookiePolicy(params, CookiePolicy.BROWSER_COMPATIBILITY);
HttpProtocolParams.setUseExpectContinue(params, false);
post.setParams(params);
ArrayList<NameValuePair> form = new ArrayList<NameValuePair>();
form.add(new BasicNameValuePair("status", "I'm tweeting!"));
UrlEncodedFormEntity ent = new UrlEncodedFormEntity(form);
post.setEntity(ent);
HttpResponse resp = mHttpClient.execute(post);
(Ripped from my own code, and stripped down a little bit for brevity. It won't compile as-is!)
Dave
2010-06-14 12:58:22
Hi....Can u tel me where to insert this code?
Saranya.R
2010-06-15 05:04:50
That's for you to work out!
Dave
2010-06-15 09:24:21
A:
Here's an example of how to develop a twitter client for android.
If you just want to send tweets from Android and not necessarily from your application you could try andtweet.
primalpop
2010-06-14 15:09:17