if (FALSE) {
# twitter API access using an app bearer token
app_auth <- Authenticate(
"twitter",
bearerToken = "xxxxxxxxxxxx"
)
# twitter authentication using developer app API keys
dev_auth <- Authenticate(
"twitter",
appName = "My App",
apiKey = "xxxxxxxxxxxx",
apiSecret = "xxxxxxxxxxxx",
accessToken = "xxxxxxxxxxxx",
accessTokenSecret = "xxxxxxxxxxxx"
)
# twitter user authentication via authorization of an app
# requires the apps consumer API keys apiKey and apiSecret parameters are
# equivalent to the apps consumer key and secret will open a web browser
# to twitter prompting the user to log in and authorize the app
user_auth <- Authenticate(
"twitter",
appName = "An App",
apiKey = "xxxxxxxxxxxx",
apiSecret = "xxxxxxxxxxxx"
)
}
Run the code above in your browser using DataLab