HttpClient on Android is the same as HttpClient in general. You create
a client, create an httpPost and send it to twittter.

It's something like

DefaultHttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(postString);
localContext = new BasicHttpContext();
client.getCredentialsProvider().setCredentials(
          new AuthScope(DOMAIN, 80, "Twitter API"),
          new UsernamePasswordCredentials(myUserName, password));
BasicScheme basicAuth = new BasicScheme();
localContext.setAttribute("preemptive-auth", basicAuth);
client.addRequestInterceptor(new PreemptiveAuth(), 0);
HttpResponse response = client.execute(post, localContext);
HttpEntity entity = response.getEntity();
InputStream in = entity.getContent();

etc.



On Jul 25, 6:28 am, Matthew Jurkoic <mjurk...@gmail.com> wrote:
> Can anyone direct me to some code examples of Google Android
> connecting to Twitter? I've played with HttpClient but have not had
> any luck. Thank you.

Reply via email to