This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start_time: %Y-%m-%dT%H:%M:%SZ | |
# end_time: %Y-%m-%dT%H:%M:%SZ | |
# needs jsonlite and httr | |
# next_token can be obtained from meta$next_token to paginate through results | |
get_tweets <- function(q="",n=10,start_time,end_time,token,next_token=""){ | |
if(n>500){ | |
warning("n too big. Using 500 instead") | |
n <- 500 | |
} | |
if(n<5){ |