title: twitter4j: 401 authentication credentials missing or incorrect
body: <p>I'm currently trying to get the userTimeline of a bunch of users. This has worked for me in the past, but now doesn't work anymore. I'm using twitter4j and using oauth. I've registered 2 applications on my account so far, which both should be able to access the twitter-api. However since yesterday I'm getting a 401 - authentication redentials missing or incorrect (tried both applications). Did twitter make any recent changes to the API? Should I setup a new twitter account? Is it an appropriate way to create an application and allow it to access your own account?</p>
  
  <p>This is the code:</p>
  
  <pre><code>ConfigurationBuilder cb = new ConfigurationBuilder();
      cb.setDebugEnabled(true)
        .setOAuthConsumerKey("q...w")
        .setOAuthConsumerSecret("R...o")
        .setOAuthAccessToken("2...7")
        .setOAuthAccessTokenSecret("O....8");
  
    TwitterFactory tf = new TwitterFactory(cb.build());
  
      Twitter twitter = tf.getInstance();
    for ( Map.Entry&lt;Long, String&gt; entry : tmls.entrySet()) {
  
          long uid = entry.getKey();
  
          Paging paging = new Paging(1, count);
  
          ResponseList&lt;Status&gt; rls;
  
          try {
              rls = twitter.getUserTimeline(uid, paging);
  
              for ( int j = 0 ; j &lt; rls.size() ; j++ ) {
  
                  if (false == ltindex.contains(uid)) {
  
  
                      alsa.add(new String[] {  String.valueOf( rls.get(j).getId() ) , String.valueOf( uid ), rls.get(j).getText() , "", entry.getValue(), String.valueOf( rls.get(j).getCreatedAt().getTime() )  });
  
                  }
  
              }
  
  
          } catch (TwitterException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
    }
  </code></pre>
  
  <p>the error:</p>
  
  <pre><code>  401:Authentication credentials (http://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid conumer key/secret, access token/secret, and the system clock in in sync.
    error - Not authorized
    request - /1/statuses/user_timeline.json?user_id=14221532&amp;include_rts=true&amp;include_entities=false&amp;count=10&amp;page=1
    Relevant discussions can be on the Internet at:
      http://www.google.co.jp/search?q=ced778ef or
      http://www.google.co.jp/search?q=10a1ea9d
    TwitterException{exceptionCode=[ced778ef-10a1ea9d], statusCode=401, retryAfter=0, rateLimitStatus=RateLimitStatusJSONImpl{remainingHits=273, hourlyLimit=350, resetTimeInSeconds=1304422, secondsUntilReset=845, resetTime=Tue May 03 11:36:48 UTC 2011}, version=2.2.3-SNAPSHOT(build: ddf24547632bf3a28b899e3d75b110de43f71c0f)}
      at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:189)
      at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
      at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:85)
      at twitter4j.TwitterImpl.get(TwitterImpl.java:1738)
      at twitter4j.TwitterImpl.getUserTimeline(TwitterImpl.java:246)
      at getExpertTweets.getSpecificOpinions(getExpertTweets.java:89)
      at classifyTweet.main(classifyTweet.java:57)
    root@se1:~# sudo ntpdate pool.ntp.org
  </code></pre>