title: Twitter4J AccessToken Generation
body: <p>I am trying to create instance of AccessToken but its raising exception message. I have two ways to generate the AccessToken. My workflow is that on android machine I authenticate the user using Oauth and then I get the accessKey, and accessSecret. I transfer those two strings to server using REST. I do following on server to get back AccessToken.</p>
  
  <p><code>AccessToken token = new AccessToken(accessToken, accessSecret);</code></p>
  
  <p>But above code is generating exeption that "java.lang.IllegalArgumentException: Invalid access token format." 
  When I do the following:</p>
  
  <pre><code>twitter = new TwitterFactory().getInstance(); 
  twitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET); 
  AccessToken aToken = twitter.getOAuthAccessToken(accessToken, accessSecret);
  </code></pre>
  
  <p>It gives following twitter exception:</p>
  
  <p>The screen name / password combination seems to be invalid.Relevant discussions can be on the Internet at:......</p>
  
  <p>Finally, I also used following code:</p>
  
  <pre><code>ConfigurationBuilder cb = new ConfigurationBuilder(); 
  cb.setDebugEnabled(true) .setOAuthConsumerKey(twitterKey)
  .setOAuthConsumerSecret(twitterSecret) 
  .setOAuthAccessToken(twitter.getAccessToken())
  .setOAuthAccessTokenSecret(twitter.getSecretToken()); 
  TwitterFactory tf = new TwitterFactory(cb.build()); 
  twitter4j.Twitter t4jTwitter = tf.getInstance();
  </code></pre>
  
  <p>It gives same invalid format exception.</p>
  
  <p>So my question is that "is this a potential bug??" and Can I create AccessToken instance when I already have accessKey and accessSecret strings??</p>
  
  <p>Thank you very much for the prompt reply.</p>
  
  <p>Irfan Mirza</p>