title: How to output my recent tweets via twitter4j?
body: <p>I'm trying my first ever code project with Twitter4J (just for fun), in which it should show the five most recent tweets of my user timeline. I found this code online and have updated it with my personal data, but it keeps throwing this exception:</p>
  
  <blockquote>
    <p>403: The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (<a href="https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following" rel="nofollow">https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following</a>). {"errors":[{"message":"SSL is required","code":92}]} Relevant discussions can be on the Internet at: <a href="http://www.google.co.jp/search?q=e5488403" rel="nofollow">http://www.google.co.jp/search?q=e5488403</a> TwitterException{exceptionCode=[e5488403-0cac370f], statusCode=403, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.5}</p>
  </blockquote>
  
  <p>Any ideas on why it isn't working? I'm still very new to this and would love advice.</p>
  
  <pre><code>import twitter4j.Paging;
  import twitter4j.ResponseList;
  import twitter4j.Status;
  import twitter4j.Twitter;
  import twitter4j.TwitterFactory;
  import twitter4j.auth.*;
  
  public final class ReadTweets {
  
  /**
   * Main method.
   *
   * @param args
   *            the command line arguments; unused here
   */
  public static void main(String[] args) {
      Twitter twitter = new TwitterFactory().getInstance();
      //consumer key and consumer secret
      twitter.setOAuthConsumer("---", "---");
      //access token and access token secret
      twitter.setOAuthAccessToken(new AccessToken("---", "---"));
  
      try {
          ResponseList&lt;Status&gt; a = twitter.getHomeTimeline(new Paging(1,5));
          for (Status b : a) {
              System.out.println(b.getText());
          }
      } catch (Exception e) {
          System.out.println(e);
      }
  
    }
  }
  </code></pre>