I want to get an access_token according to this documentation http://dev.twitter.com/doc/post/oauth/request_token. I use javascript.
$.ajax({
url: "http://api.twitter.com/oauth/request_token",
type: "POST",
contentType: "json",
data: {
oauth_consumer_key: "DFwQqCnOTaYVbZQdBFqpR",
oauth_signature_method: "HMAC-SHA1",
oauth_timestamp: parseInt((new Date()).getTime() / 1000),
oauth_nonce: "R" + parseInt((new Date()).getTime() / 1000),
oauth_version: "1.0"
},
success: function (data) {
debugger;
},
error: function (a, b, c) {
debugger;
}
});
But it does not work at all. Always return error, never success.