title: How to tweet from an Android app using REST API 1.1
body: <p>Here I am posting some text from an Android app to a user's Twitter account, and I have ConsumerKey, Consumer secret key, AccessToken, and AccessToken secret key.</p>
  
  <pre><code>https://api.twitter.com/1.1/statuses/update.json
  </code></pre>
  
  <p>By using simple a HTTP client request, I want to post data on a Twitter user account. How can I do that?</p>
  
  <p>I tried something like</p>
  
  <pre><code>HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost("http://api.twitter.com/1/statuses/update.json");
  
  // HttpPost httppost = new HttpPost("https://graph.facebook.com/" + profile_ID + "/feed");
  
  System.out.println("httppost " + httppost);
  
  try {
      // Add your data
      List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
      nameValuePairs.add(new BasicNameValuePair("access_token", access_token_value));
      nameValuePairs.add(new BasicNameValuePair("message", compose.getText().toString()));
      httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  
      // Execute HTTP Post Request
      HttpResponse response = httpclient.execute(httppost);
  
      System.out.println("response "+response.toString());
  
  }
  catch (ClientProtocolException e) {
      // TODO Auto-generated catch block
  }
  catch (IOException e) {
      // TODO Auto-generated catch block
  }
  </code></pre>
  
  <p>But parameters are wrong in my code, <a href="https://dev.twitter.com/docs/api/1.1/post/statuses/update" rel="nofollow">following this</a>, but I didn't get it so what is some suitable solution for this?</p>