Closed herrmannrobert closed 6 years ago
Streaming twitter (rtweet package) works fine for me when manually running the code - but not when scheduling the task using the RStudio-AddIn (stops immediately after it starts running). Any idea...?
Loading and saving the access token:
library("rtweet") appname <- "herr[...]mann" key <- "SzA[...]1o7u" secret <- "4MtSJom[...]WjdgRUuz" twitter_token <- create_token(app = appname, consumer_key = key, consumer_secret = secret) saveRDS(twitter_token, "twitter_token.rds")
Then scheduling (or manually running) the task:
library("rtweet") twitter_token <- readRDS("twitter_token.rds") stream_tweets(q = "election", file_name = "...", timeout = 60)
Thanks for any hint...
Look at the log and use full paths to your read/write ops
Streaming twitter (rtweet package) works fine for me when manually running the code - but not when scheduling the task using the RStudio-AddIn (stops immediately after it starts running). Any idea...?
Loading and saving the access token:
Then scheduling (or manually running) the task:
Thanks for any hint...