title: how to post tweet using twitter4j in java?
body: <p>I am able to login to twitter using twitter4j and get information about the logged in user but i am not able to post tweet from my application. I am using java web application to post tweet. see the code below that i use.</p>
  
  <pre><code>String ACCESS_TOKEN = "ttttttttt";
      String ACCESS_TOKEN_SECRET = "gggggggggggggg";
      String CONSUMER_KEY = "gggggggggggg";
      String CONSUMER_SECRET = "hhhhhhhhhhhhh";
      String tweet = "";
      if (request.getParameter("tweet") != null) {
          tweet = request.getParameter("tweet");
      }
      AccessToken accessToken = new AccessToken(ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
      OAuthAuthorization authorization = new OAuthAuthorization(ConfigurationContext.getInstance(), CONSUMER_KEY, CONSUMER_SECRET, accessToken);
      Twitter twitter = new TwitterFactory().getInstance(authorization);
      try {
          //twitter.updateStatus("Hello World!");
          twitter.updateStatus(tweet);
      } catch (TwitterException e) {
          System.err.println("Error occurred while updating the status!");
      }
  </code></pre>
  
  <p>i get the follwing exception:</p>
  
  <p>TwitterException{exceptionCode=[fa54b184-3bf2623f], statusCode=401, retryAfter=0, rateLimitStatus=null, version=2.1.5-SNAPSHOT(build: d372a51b9b419cbd73d416474f4a855f3e889507)}</p>
  
  <p>Please help.</p>