Twitter API v2 authentication uses OAuth2 and requires app consumer keys or bearer token.
# S3 method for twitter2
Authenticate(socialmedia, consumerKey, consumerSecret, bearerToken, ...)
Character string. Identifier for social media API to authenticate, set to "twitter2"
.
Character string. API consumer key to authenticate.
Character string. API consumer secret to authenticate.
Character string. API access token to authenticate.
Additional parameters passed to function. Not used in this method.
A credential
object containing a bearer token $bearer
and social media type descriptor
$socialmedia
set to "twitter2"
. Object has the class names "credential"
and "twitter2"
.