ROAuth handshake
===

I have been trying to authenticate through ROAuth using the following script:

     
        library("ROAuth")
	    library("RCurl")

	requestURL <- "https://api.twitter.com/oauth/request_token"
	accessURL = "https://api.twitter.com/oauth/access_token"
	authURL = "https://api.twitter.com/oauth/authorize"

	
	cKey<- "Key"
	cSecret<- "Secret"


	Cred <- OAuthFactory$new(consumerKey=cKey,
                consumerSecret=cSecret,
                requestURL=requestURL,
                accessURL=accessURL,
                authURL=authURL)

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


Every time I enter in this code, I get the error:

    Error in Cred$handshake(cainfo = system.file("CurlSSL", "cacert.pem",  : Invalid response from site, please check your consumerKey and consumerSecret and try again.

I am not sure what I am doing wrong. I have made sure every necessary package is up to date by re-installing ROauth and RCurl and checking their version information (ROAuth 0.9.1 and  RCurl_1.91-1.1(?) ). After installation, I restarted R (as a possible solution suggested by another post). I copy-pasted and double-checked the consumer key and consumer secret, and I am sure they are correct. Does anyone have any other ideas?  


Thank you.

