# NOT RUN {
# }
# NOT RUN {
#Configuration fo twitter API connection
#this could be avoid and use the default configuration
requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
consumerKey <- sys.getenv("consumer_key")
consumerSecret <- sys.getenv("consumer_secret")
#definition of the start time and end time
t_start<-"2015-09-11 9:45:00"
t_end<-"2015-09-11 23:59:59"
#definition of the file prefix
fileprefix="tweets"
key=c("keyword1", "keyword2")
#definition number of tweets per file
number=3000
#running the function
tweet2r(t_start=t_start,t_end=t_end,ntweets=number,keywords=key,fileprefix = fileprefix,
requestURL,accessURL,authURL,consumerKey,consumerSecret)
#running the function using bbox
#set up a bbox
bbox=c(-0.1644,39.8485,0.6916,40.0034)
tweet2r(t_start=t_start,t_end=t_end,ntweets=number,bbox=bbox,fileprefix = fileprefix,
requestURL,accessURL,authURL,consumerKey,consumerSecret)
# }
Run the code above in your browser using DataLab