title: Search twitter and obtain tweets by hashtag, maximizing number of returned search results
body: <p>I am attempting to compile a corpus of all Tweets related to the World Cup on Twitter from their API using the <strong><em>twitteR package</em></strong> in R.</p>
  
  <p>I am using the following code for a single hashtag (for example). However, my problem is that it appears I am only 'authorized' to access a limited set of the tweets (in this case, only the 32 most recent).</p>
  
  <pre><code>library(twitteR)
  
  reqURL &lt;- "https://api.twitter.com/oauth/request_token"
  accessURL &lt;- "https://api.twitter.com/oauth/access_token"
  authURL &lt;- "http://api.twitter.com/oauth/authorize"
  #consumerKey &lt;- Omitted
  #consumerSecret &lt;- Omitted
  twitCred &lt;- OAuthFactory$new(consumerKey=consumerKey,
                               consumerSecret=consumerSecret,
                               requestURL=reqURL,
                               accessURL=accessURL,
                               authURL=authURL)
  options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package =  "RCurl")))
  twitCred$handshake()
  
  #setwd("/Users/user/FIFA")
  
  #save(twitCred, file="twitterAuthentication.Rdata")
  #load("twitterAuthentication.Rdata")
  registerTwitterOAuth(twitCred)
  
  FIFA&lt;-searchTwitter("#WorldCup", n=9999, since='2007-10-30')
  </code></pre>
  
  <p>Returns the following error:</p>
  
  <pre><code>Warning message:
  In doRppAPICall("search/tweets", n, params = params, retryOnRateLimit = retryOnRateLimit,  :
    9999 tweets were requested but the API can only return 32
  </code></pre>
  
  <p><strong><em>My question is: How do I access the maximum number of tweets using a specific hashtag? (Also, could someone clarify what the 'max' limit actually is? And why I can't seem to get anywhere close to this value of (~ 1500 tweets)?</em></strong></p>
  
  <p>I have tested OAuth within the Twitter Developer website and obtained signing results for the Signature base string, authorization header, and cURL commands respectively, indicating to me that I have the appropriate permissions &amp; authorizations to draw the appropriate data from Twitter's servers. Please advise/correct me if I am wrong, or if you need further information on this.</p>
  
  <p>My API Permissions are currently set to: Read, Write &amp; Access direct messages</p>
  
  <pre><code>Session Info:
  
  R version 3.0.2 (2013-09-25)
  Platform: x86_64-apple-darwin10.8.0 (64-bit)
  
  locale:
  [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] RJSONIO_1.0-3  twitteR_1.1.7  rjson_0.2.12   ROAuth_0.9.3   digest_0.6.3   RCurl_1.95-4.1 bitops_1.0-5  
  [8] foreign_0.8-55
  
  loaded via a namespace (and not attached):
  [1] tools_3.0.2
  </code></pre>
  
  <p>Additional Resource/Source:</p>
  
  <p><a href="https://stackoverflow.com/questions/10328066/twitter-package-in-r-maximum-tweets-using-searchtwitter">twitter package in R maximum tweets using searchTwitter()</a></p>
  
  <p>This source states the max is 1500</p>
  
  <p><a href="https://stackoverflow.com/questions/20751894/twitter-api-searching-tweets-for-hashtags">Twitter api searching tweets for hashtags</a></p>
  
  <p>This source states the max is 3200</p>