Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Using search_fullarchive() with developer access #473

Closed
jrosen48 opened this issue Feb 16, 2021 · 5 comments
Closed

Using search_fullarchive() with developer access #473

jrosen48 opened this issue Feb 16, 2021 · 5 comments

Comments

@jrosen48
Copy link

jrosen48 commented Feb 16, 2021

Problem

I am trying to use the rtweet::search_fullarchive() function using access through an academic project, Twitter's new program for allowing access to the full archive for research use.

Expected behavior

I expected a tibble with the results of the search to be returned.

Reproduce the problem

I tried to run the following (after creating a token interactively earlier using the credentials associated with my academic project):

library(rtweet)
rt <- search_fullarchive("#rstats", n = 300, env_name = "research",
                         fromDate = "201401010000", toDate = "201401312359",
                         token = token)

The following was returned:

tweets/search/fullarchive/research ***Warning: list(message = "Forbidden: Authentication succeeded but account is not authorized to access this resource.", sent = "2021-02-16T18:49:13+00:00", transactionId = "000de4b900358352")

rtweet version

0.7.0

Session info

R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] openssl_1.4.3 rtweet_0.7.0 

loaded via a namespace (and not attached):
 [1] prettyunits_1.1.1 digest_0.6.27     crayon_1.4.1      R6_2.5.0          jsonlite_1.7.2    lifecycle_0.2.0  
 [7] magrittr_2.0.1    evaluate_0.14     httr_1.4.2        pillar_1.4.7      progress_1.2.2    rlang_0.4.10     
[13] curl_4.3          vctrs_0.3.6       ellipsis_0.3.1    rmarkdown_2.6     tools_4.0.3       tinytex_0.28     
[19] hms_1.0.0         xfun_0.20         yaml_2.2.1        compiler_4.0.3    askpass_1.1       pkgconfig_2.0.3  
[25] htmltools_0.5.1   knitr_1.30        tibble_3.0.6     

Token

@llrs
Copy link
Collaborator

llrs commented Feb 16, 2021

Your authenticate seems to be failing. Can you do anything else that requires (your) authentication?
It says your "account is not authorized to access this resource"

@jrosen48
Copy link
Author

Thank you.

The following works fine:

rtweet::search_tweets("#rstats")

The issue seems to have to do with the "developer environment".

The "Academic Project" I have is associated with an app, but not a developer environment, as far as I can tell.

In particular, there is no environment pertaining to the "Academic Project" app here:

https://developer.twitter.com/en/account/environments

@jrosen48
Copy link
Author

Is it possible that dev environments apply to Premium accounts, but not Academic Projects?

@llrs
Copy link
Collaborator

llrs commented Feb 18, 2021

Not sure how is this organized I opened a question on Twitter developer's community site. Let's see what do they reply

@jrosen48
Copy link
Author

This is related to #468 and I think can be deleted/tracked there, instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants