Message-ID: <130bd81aa540ab1f8a9715f9cd5190c7642050c7.camel@pp.inet.fi>
Date: 2020-04-08T05:55:31Z
From: Kimmo Elo
Subject: TWITTER API environment variables
In-Reply-To: <20200408051938.GA4690@slingshot.co.nz>
Hi!
Have you already read this:
https://cran.r-project.org/web/packages/rtweet/vignettes/auth.html
I think they explain rather well how to use Twitter tokens with
rtweet...
HTH,
Kimmo
ke, 2020-04-08 kello 17:19 +1200, Patrick Connolly kirjoitti:
> I'm using the rtweet package which makes use of the Twitter API which
> requires a token alluded to by an environment variable.
>
> That environment variable is automatically set up from the Twitter
> web
> site and takes the name TWITTER_<username> (where <username> is the
> name of the user in block letters). That worked fine on my work
> computer where my username is 'work'. When I copied that working
> directory to my home computer, the environment variable became
> TWITTER_HOME but the rtweet package was looking for
> TWITTER_WORK. There was no error message: just a null result from the
> search_users() function.
>
> I tried editing the ~/.Renviron entry to
> TWITTER_WORK=/home/home/.rtweet_token.rds
>
> That worked for a short time but soon ceased working. Then I noticed
> a new entry had been automatically added to ~/.Renviron
>
> TWITTER_HOME=/home/home/.rtweet_token1.rds
>
> So now I had two environment variables which also worked for a short
> time.
>
> Recommendations please.
>