I am using Node.js and I am using a library by name node-oauth
Now when I make a request to get the requestTokens, I get the following error
[Error: 2712:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:607:
]
Which upon on Googling I do not get any result. What is this error ? How do I go about resolving this ?
My node.js code is as follows
//oauth test
var OAuth= require('oauth').OAuth;
var key = 'xxxxx';
var secret = 'xxxxx';
var redirect = null;
var client = new OAuth('https://api.twitter.com/oauth/request_token', 'https://api.twitter.com/oauth/access_token', key, secret, '1.0', redirect, 'HMAC-SHA1' , null, {'Accept': '*/*', 'Connection': 'close'});
function getRequestToken()
{
console.log(client);
client.getOAuthRequestToken(function(error, oauth_token, oauth_token_secret, results)
{
console.log(error);
console.log('oauth_token :' + oauth_token);
console.log('oauth_token_secret :' + oauth_token_secret);
});
}
getRequestToken();