XYZ
XYZ

Reputation: 105

What's the issue with TwitterOAuth in twitteR (R package)?

I'm using the R package twitteR to retrieve twitter data.

The manual says:

the function "registerTwitterOAuth" is deprecated

and

the function "setup_twitter_oauth" is called for its side effect.

What's the problem with them?

Upvotes: 0

Views: 117

Answers (1)

DeanAttali
DeanAttali

Reputation: 26323

setup_twitter_oauth is the function you want to use. It's true you call it for it's sideeffect - the side effect being the fact that it'll authorize you to make calls to the Twitter API. You have to pass it your keys/secrets/tokens as per its function documentation.

I store these values in options so that when I need to authenticate I simply call

setup_twitter_oauth(getOption('twitter_consumer_key'),
                    getOption('twitter_consumer_secret'),
                    getOption('twitter_access_token'),
                    getOption('twitter_access_secret'))

Upvotes: 3

Related Questions