I can't use "rtweet" package in R

337 Views Asked by At

I am trying to setup the default authentication mechanism of the "rtweet" package. But i got this error: "Error in httr::init_oauth1.0(endpoint, app, permission = permission, is_interactive = is_interactive, : Unauthorized (HTTP 401)."

This is the code i have been using and the outputs that i have:

rtweet::auth_setup_default()

Error in httr::init_oauth1.0(endpoint, app, permission = permission, is_interactive = is_interactive, : Unauthorized (HTTP 401).

auth_setup_default()

Error in httr::init_oauth1.0(endpoint, app, permission = permission, is_interactive = is_interactive, : Unauthorized (HTTP 401).

auth_has_default()

[1] FALSE

I try to install from different sources the "rtweet" package. For example :

remotes::install_github("ropensci/rtweet")
install.packages("rtweet", repos = 'https://ropensci.r-universe.dev')
install.packages("rtweet")

I have this version of the package:

packageVersion("rtweet")

[1] ‘1.2.0’

But i still have the same problem. Can somebody help me, please

1

There are 1 best solutions below

0
llrs On

I'm the maintainer of the library. As answered in the comments and linked, the default authentication used until now was suspended. You'll need to use your own credentials and pay if you want to collect data from Twitter.