skip to Main Content

I was wondering whether anyone has found a way to how to use search_fullarchive() from the "rtweet" package in R with the new Twitter academic research project track?

The problem is whenever I try to run the following code:

search_fullarchive(q = "sunset", n = 500, env_name = "AcademicProject", fromDate = "202010200000", toDate = "202010220000", safedir = NULL, parse = TRUE, token = bearer_token)

I get the following error "Error: Not a valid access token". Is that because search_fullarchive() is only for paid premium accounts and that doesn’t include the new academic track (even though you get full archive access)?

Also, can you retrieve more than 500 tweets (e.g., n = 6000) when using search_fullarchive()?

Thanks in advance!

2

Answers


  1. I’ve got the same problem w/ Twitter academic research API. I think if you set n = 100 or just skip the argument, the command will return you 100 tweets. Also, the rtweet package does not (yet) support the academic research API.

    Login or Signup to reply.
  2. Change your code to this:

    search_fullarchive(q = "sunset", n = 500, env_name = "AcademicProject", fromDate = "202010200000", toDate = "202010220000", safedir = NULL, parse = TRUE, token = t, env_name = "Your Environment Name attained in the Dev Dashboard")
    

    Also The token must be created like this:

    t <- create_token(
      app = "App Name",
      'Key',
      'Secret',
      access_token = '',
      access_secret = '',
      set_renv = TRUE
    )
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search