auth_twitter_dev: Twitter Dev API authentication

View source: R/wrappers.R

auth_twitter_devR Documentation

Twitter Dev API authentication

Description

Twitter authentication uses OAuth and typically requires four developer API keys generated when you create a twitter app via the twitter developer web site. These keys and the authentication object produced are referenced as developer keys and developer access in this package. Software using developer access to the API can operate with full access to the API including within the user-context but with the understanding that it is an app. The rtweet package refers to this as 'bot' authentication.

Usage

auth_twitter_dev(
  app_name = "r twitter app",
  api_key,
  api_secret,
  access_token,
  access_token_secret,
  verbose = FALSE,
  ...
)

Arguments

app_name

Character string. Registered twitter app name associated with the API keys.

api_key

Character string. API consumer key to authenticate (also called API key).

api_secret

Character string. API consumer secret to authenticate (also called API secret).

access_token

Character string. API access token to authenticate.

access_token_secret

Character string. API access token secret to authenticate.

verbose

Logical. Output additional information. Default is FALSE.

...

Additional parameters passed to function. Not used in this method.

Value

A credential object containing an access token $auth and social media type descriptor $socialmedia set to "twitter". Object has the class names "credential" and "twitter".

Note

vosonSML uses the rtweet package for twitter data collection and also gratefully acknowledges the techniques and code written by its authors reproduced in this package for creating twitter API access tokens.

Examples

## Not run: 
# twitter authentication using developer app API keys
auth <- auth_twitter_dev(
  app_name = "My App",
  api_key = "xxxxxxxxxxxx",
  api_secret = "xxxxxxxxxxxx",
  access_token = "xxxxxxxxxxxx",
  access_token_secret = "xxxxxxxxxxxx"
)

## End(Not run)


vosonSML documentation built on Aug. 16, 2022, 5:14 p.m.