title: Invalid Request token using OAuth and R - Is the R-code correct?
body: <p>I'm revising my original query to ask specifically if anyone can see a reason that the R-code I give below would, in of itself, lead to an invalid request token. If not, I'll know my issue lies elsewhere.</p>
  
  <p>I’m trying to use the twitteR package as I’ve gotten to the Twitter chapter in Jeffrey Stanton’s free e-book on Data science which is helping me learn R. I get so far and then Twitter gives me this message:</p>
  
  <p><em>Whoa there!
  The request token for this page is invalid. It may have already been used, or expired because it is too old. Please go back to the site or application that sent you here and try again; it was probably just a mistake.</em> </p>
  
  <p>I’ve got the bitops, RCurl, RJSONIO, twitter and ROAuth packages installed. I then run this code(NB I can't post links because my reputation is too low):</p>
  
  <pre><code>reqURL &lt;- "//api.twitter.com/oauth/request_token"
     accessURL &lt;- "//api.twitter.com/oauth/access_token"
     authURL &lt;- "//api.twitter.com/oauth/authorize"
     consumerKey &lt;- "abc"
     consumerSecret &lt;- "xyz"
     twitCred &lt;- OAuthFactory$new(consumerKey=consumerKey,
                                  consumerSecret=consumerSecret,
                                  requestURL=reqURL,
                                  accessURL=accessURL,
                                  authURL=authURL)
  </code></pre>
  
  <p>Followed by this:</p>
  
  <pre><code>twitCred$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl") )
  </code></pre>
  
  <p>I then get this prompt:</p>
  
  <p><strong>To enable the connection, please direct your web browser to: 
  <a href="http://api.twitter.com/oauth/authorize?oauth_token=Kxa" rel="nofollow">http://api.twitter.com/oauth/authorize?oauth_token=Kxa</a>...
  When complete, record the PIN given to you and provide it here:</strong></p>
  
  <p>At this point I can’t seem to copy the twitter link, so I hand type it(!) into my browser and I get the message from Twitter I started my question with.
  I’ve tried a number of times with the same outcome. The OAuth bit in the TwitteR vignette on r-project doesn’t have anything on this (it assumes I’d have done it right I suppose!) and the example on page nine of the TwitteR package description doesn’t help me either.</p>
  
  <p>Thanks.</p>