0

I am using rtweet package to get data from twitter. However,problems happened when I tried to create create_token. The error info is

cannot open file 'C:/Users/??/Documents/.rtweet_token.rds': Invalid argument

enter image description here

I have tried to set 'set_renv' as FALSE, but the same error went up again when running search_tweets function. So, this problem is relavent to the home directory I guess?

create_token(app = appname, api_key, api_secret,
             access_token = access_token, access_secret = access_token_secret,
             set_renv = TRUE)

public<- rtweet::search_tweets(
  "#Nike", n = 1000, include_rts = FALSE, safedir = FALSE,parse = TRUE
)
James Z
  • 12,209
  • 10
  • 24
  • 44
si li
  • 1
  • 2

1 Answers1

0

I have had the same issues, but what I noticed was that once you run it the first time, you can't run it again unless you restart your R session, so if you change data you'll have to restart the session to re-run it

Jacob
  • 406
  • 3
  • 19