title: Unable to authenticate using twitter4j
body: <p>I've got a problem with trying to authenticate to Twitter using twitter4j. I've tried <a href="https://stackoverflow.com/questions/20638190/twitter4j-authentication-credentials-are-missing">this</a> out and yet it is still not working.</p>
  
  <p>Here's my code, any help would be greatly appreciated.</p>
  
  <p>Thanks.</p>
  
  <pre><code>public class SpeedDemon {
  
  /**
   * @param args the command line arguments
   */
  public static void main(String[] args) throws TwitterException {
  // Setup for Snake Charmer
  
  ConfigurationBuilder cb = new ConfigurationBuilder();
  cb.setDebugEnabled(true)
          .setOAuthConsumerKey("CONSUMER_KEY")
          .setOAuthConsumerSecret("CONSUMER_SECRET")
          .setOAuthAccessToken("OAUTH_ACCESS")
          .setOAuthAccessTokenSecret("OAUTH_SECRET");
  TwitterFactory tf = new TwitterFactory(cb.build());
  Twitter twitter = tf.getInstance();
  
  // Gets timeline.
  Twitter twit = TwitterFactory.getSingleton();
  List&lt;Status&gt; statuses = twit.getHomeTimeline();
  System.out.println("Showing home timeline.");
  for (Status status : statuses) {
      System.out.println(status.getUser().getName() + ":" +
                         status.getText());
  }
  
  }
  
  }
  </code></pre>
  
  <p>EDIT: The following error happens at compilation:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalStateException: Authentication credentials are missing. See http://twitter4j.org/en/configuration.html for details
  at twitter4j.TwitterBaseImpl.ensureAuthorizationEnabled(TwitterBaseImpl.java:215)
  at twitter4j.TwitterImpl.get(TwitterImpl.java:1784)
  at twitter4j.TwitterImpl.getHomeTimeline(TwitterImpl.java:105)
  at speeddemon.SpeedDemon.main(SpeedDemon.java:30)
  C:\Users\Kevin\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1
  BUILD FAILED (total time: 0 seconds)
  </code></pre>