我收到错误“无法验证 oauth 签名和令牌 401 未经授权”。这是我的代码
<html>
<body>
<script type="text/javascript" src="jsOauth-1.3.1.js"></script>
<script type="text/javascript">
var options={
consumerKey: 'key',
consumerSecret: 'secret',
callbackUrl: 'url',
};
oauth=OAuth(options);
oauth.get("https://api.twitter.com/oauth/request_token",function(data){
requestparams=data.text;
console.log(options);
alert(data.text);
window.open("https://api.twitter.com/oauth/authorize?"+data);
},
function(data){alert("UnAuthorized...:("+data.text);}
);
</script>
</body>
</html>