View source: R/Authenticate.mastodon.R
Authenticate.mastodon | R Documentation |
Mastodon OAuth authentication.
## S3 method for class 'mastodon'
Authenticate(
socialmedia,
instance = NULL,
type = "public",
verbose = FALSE,
...
)
socialmedia |
Character string. Identifier for social media API to authenticate, set to |
instance |
Character string. Server to authenticate against and create token. |
type |
Character string. Type of access, can be |
verbose |
Logical. Output additional information. Default is |
... |
Additional parameters passed to function. Not used in this method. |
A credential
object containing an access token $auth
and social media type descriptor
$socialmedia
set to "mastodon"
. Object has the class names "credential"
and "mastodon"
.
vosonSML uses the rtoot package for Mastodon data collection and API access tokens.
## Not run:
# mastodon API public access bearer token
mastodon_auth <- Authenticate(
"mastodon",
instance = "mastodon.social"
)
# mastodon API user access bearer token
mastodon_auth_user <- Authenticate(
"mastodon",
instance = "mastodon.social",
type = "user"
)
# if thread collection API token not required
mastodon_auth <- Authenticate("mastodon")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.