title: How can I get a Twitter public timeline with no user authentication using Twitter4j?
body: <p>I've wrote some code to allow a user to login to his Twitter account and send Tweet using Twitter4j and following <a href="http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/">this tutorial</a>.</p>
  
  <p>Now I can also get the tweets of a public account using</p>
  
  <pre><code>ConfigurationBuilder cb = new ConfigurationBuilder();
  cb.setHttpConnectionTimeout(10000)
  .setHttpReadTimeout(10000)
  .setOAuthConsumerKey(Config.TWITTER_CONSUMER_KEY)
  .setOAuthConsumerSecret(Config.TWITTER_CONSUMER_SECRET)
  .setOAuthAccessToken(Utils.getPrefsString(getActivity(),
      TwitterPrefsFragment.PREF_KEY_OAUTH_TOKEN, "")) // empty if not authentified
  .setOAuthAccessTokenSecret(Utils.getPrefsString(getActivity(),
      TwitterPrefsFragment.PREF_KEY_OAUTH_SECRET, "")); // empty if not authentified
  TwitterFactory tf = new TwitterFactory(cb.build());
  Twitter twitter = tf.getInstance();
  
  List&lt;twitter4j.Status&gt; statuses = twitter.getUserTimeline(SOME_PUBLIC_TWITTER_ACCOUNT, new Paging(1, 50));
  </code></pre>
  
  <p>but this only works when the user is authenticated and the app has the oauth token and secret in the preferences..</p>
  
  <p>How can I get a Twitter public timeline with no Access Token, i.e. without having the user to authenticate?</p>
  
  <p><b>EDIT</b></p>
  
  <p>I'm reformulating my question to make it clearer:</p>
  
  <p>I managed to authenticate my Twitter app and a user with the code given <a href="http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/">here</a>.</p>
  
  <p>Now, if the user is not logged in, how can I get a public timeline? In that case, there is no <code>OAUTH_TOKEN</code> and <code>OAUTH_SECRET</code>, and the request shown above does not work because an empty string is set to <code>ConfigurationBuilder.setOAuthAccessToken</code> and <code>ConfigurationBuilder.setOAuthAccessTokenSecret</code>.</p>
  
  <p>So what is, if it exists, the request to get a public timeline, with no <code>OAUTH_TOKEN</code> and <code>OAUTH_SECRET</code>?</p>