Learn R Programming

vosonSML (version 0.32.7)

auth_twitter_user: Twitter User API authentication

Description

A method commonly used by third-party apps in which an app can be authorized by a user to use the twitter API on their behalf. The implementation of this method in vosonSML does not require a developer account but does still require the user to have access to an apps two consumer API keys (generated by the app developer). The authentication object with token produced from this method allows the user to access the API within their own user-context and rate-limits.

Usage

auth_twitter_user(api_key, api_secret, verbose = FALSE, ...)

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".

Arguments

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).

verbose

Logical. Output additional information. Default is FALSE.

...

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

Examples

Run this code
if (FALSE) {
# twitter user authentication via authorization of an app requires the
# apps consumer API keys (api_key and api_secret)
# this method will open a web browser to twitter prompting the user to
# log in and authorize the app
auth <- auth_twitter_user(
  api_key = "xxxxxxxxxxxx", api_secret = "xxxxxxxxxxxx"
)
}

Run the code above in your browser using DataLab