Checks if a Twitter token is present at the supplied link and if not
gives instructions on how to create one.
add_twitter_api()
Value
Prints instructions to the command line.
Examples
add_twitter_api()
#> A Twitter token is required to add posts to your twitter account.
#> The first step is to create a twitter app, enter the following code for instructions.
#>
#> library(rtweet); vignette("auth")
#>
#> Follow the instructions to create a Twitter app.
#> Copy the Consumer key and secret and create a token with the following code:
#>
#> twitter_token <- rtweet::create_token(app = "your_appname_here",
#> consumer_key = "key_here",
#> consumer_secret = "secret_here")
#>
#> Note if setting up the bot on a remote server do this locally and then upload
#>
#> Now save this token to your home directory with the following code:
#>
#> saveRDS(twitter_token, file = "~/twitter_token.rds"")
#>
#> Now save the token as an enviroment variable:
#>
#> Sys.setenv(TWITTER_PAT = "~/twitter_token.rds")
#>
#> If using Rstudio server you made need to manually add the TWITTER_PAT to the .Renviron.