1

I have a shiny app that collect tweets from twitter and do some sentiment analysis over them what i want is to collect tweets through the client's twitter account by make him/her sign in to twitter through my app so once the client visit my website and want to do some sentiment analysis for certain topic my website will collect tweets related to the topic using the client's Twitter account

I Went through the steps provided by Twitter in this link: https://dev.twitter.com/web/sign-in/implementing

my R code :

    library(httr)
library(ROAuth)

credentials <- OAuthFactory$new(consumerKey = "TFJVM92uscmNc7POwlG6YwsgS", 
                                  consumerSecret = "YnrYJ9jTxZrW4nLiHu0WrM4tvmFP3eTt6zsEKfEd9rggmpbV2e", 
                                  requestURL= "https://api.twitter.com/oauth/request_token",
                                  accessURL= "https://api.twitter.com/oauth/request_token",
                                  needsVerifier=FALSE
                                )
credentials$handshake(signMethod="HMAC",  curl=getCurlHandle())
credentials$OAuthRequest("https://api.twitter.com/oauth/request_token", "POST")

but i get this error:

credentials$handshake(signMethod="HMAC",  curl=getCurlHandle())
Error in function (type, msg, asError = TRUE)  : 
  SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
> credentials$OAuthRequest("https://api.twitter.com/oauth/request_token",

"POST") Error in credentials$OAuthRequest("https://api.twitter.com/oauth/request_token", : This OAuth instance has not been verified

Can anyone help me with this

1 Answer 1

1

I had a similar error: Error in my_oauth$OAuthRequest(URL = url, params = params, method = "GET", : This OAuth instance has not been verified. The help here might be of use to you, as it was to me. In particular, check out this section of code + comments:

my_oauth$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))

# Copy and paste the PIN number (6 digits) on the R console
# Change current folder into a folder where you will save all your tokens
# Now you can save oauth token for use in future sessions with R

Hope this helps.

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.