Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

r programming --- twitteR OAuthFactory object error

Tags:

r

I am setting up an R session to be able to download twitter feeds. I got stumbled on the very step with R citing 'object OAuthFactory not found'. I have all the libraries needed for the program and packages installed: Here is my code

my.key <- "xxx"

#consumer secret
my.secret <- "xxx"

cred <- OAuthFactory$new(consumerKey=my.key, consumerSecret=my.secret,
    requestURL = 'https://api.twitter.com/oauth/request_token',
    accessURL = 'https://api.twitter.com/oauth/access_token',
    authURL   = 'https://api.twitter.com/oauth/authorize')

Error: object 'OAuthFactory' not found

Thanks for your help in advance!

like image 637
seakyourpeak Avatar asked Apr 14 '26 11:04

seakyourpeak


1 Answers

I did some more research and found that I had to install two more packages that were not part of the twitteR package. Here is what I needed and it worked:

install.packages(c('ROAuth','RCurl'))
require('ROAuth')
require('RCurl')

Thx

like image 131
seakyourpeak Avatar answered Apr 16 '26 04:04

seakyourpeak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!