Description Usage Arguments Value Examples
Stores Twitter API token information for the duration of the session
1 | set_token(x)
|
x |
Either a token or path to a token. If path, the token is read using
|
The token is invisibly returned but more importantly the environment variable "TWITTER_PAT" is set to point toward the saved token file. This will be reset at the end of the session.
1 2 3 4 5 6 7 8 9 10 | ## if your system already has an environment variable for an rtweet token,
## this will return the path
(pat <- Sys.getenv("TWITTER_PAT"))
## if your system doesn't have this environment variable OR if you wish to
## override this value, then enter the desired path or token object
#pat <- "/path/to/rtweet-token.rds"
## and then set the token for use for the remainder of the session
#set_token(pat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.