set_bearer: Set Bearer for Twitter API

View source: R/set_bearer.R

set_bearerR Documentation

Set Bearer for Twitter API

Description

This function will set key and secret key as environment variables.

Usage

set_bearer(key, secret)

Arguments

key

Twitter API key is used to authenticate requests.

secret

Twitter API secret is used to authenticate requests.

Details

The key and secret is always required, which is essentially the username and password for your API. To generate this key via https://developer.twitter.com/

If the key and secret are successfully set, the function will return TRUE; otherwise, it returns FALSE.

Value

TRUE

key and secret are successfully set

FALSE

key and secret are not successfully set

Author(s)

Ao Tang

Examples


# key = 'YOUR-KEY-HERE'

# secret = 'YOUR-SECRET-HERE'
# result <- set_bearer(key, secret) 
# print(result)


tangaot/twitterapiR documentation built on March 24, 2022, 12:40 p.m.