1

To make it simple, I manage to retrieve tweet in R using twitteR library. The specific code is:

List <- searchTwitter('searchterm', n=1000)

The problem is my search term aren't really popular because it's a local brand and people in this region using twitter less than before. Most of the tweets are came from 2013 to 2015 while today I can only retrieve 12 tweets within the range of latest week.

Is there anyway for me to retrieve old tweet, at least around 200 latest tweets without considering the date?

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
user6748005
  • 47
  • 2
  • 8
  • Twitter Corporation tries to make money from this historical data. I think you can purchase this from them, or more specifically through a company called gnip, http://gnip.com that they acquired in 2014, or this blog post: https://blog.twitter.com/2016/harnessing-the-power-of-historical-twitter-data – knb Jan 09 '17 at 13:31

1 Answers1

4

You can only get tweets from the last 6-9 days with the REST API. You will probably have to find a solution where you can iterate through Twitter accounts that you know that have tweeted about the company before and pull their timelines. You can do:

List <- userTimeline("Username", n = 2000)

And then convert the list to a data frame:

Df <- twListToDF(List)

You can also iterate through each of those users' followers and see if they have tweeted anything similar, and keep an eye on the call limit. But the REST API is fairly limited in what you can pull back for general tweets (without pulling an entire user's timeline.)

Oliver Frost
  • 827
  • 5
  • 18
  • Sadly they don't. But a lot of old tweet stil using it's name on mention. – user6748005 Jan 09 '17 at 09:06
  • You might be referring to the previous edit. You can also use `getUser`, which will create an object with methods such as `getFollowers`. You can create a function, iterating through each of the users' followers, pull back the last 2000 tweets from their timeline and examine it for tweets relating to the company. – Oliver Frost Jan 09 '17 at 09:10
  • Even though some tweet mention it, the brand itself has no twitter acount and the mention connect to certain inactive personal account which didn't had follower with relevant tweets. But anyway, thank for the answer. It could be useful for other well known brand with twitter account. – user6748005 Jan 09 '17 at 09:15