Twitter API 1.1 getJson

时间:2015-01-22 11:56:36

标签: javascript jquery twitter

我想使用jQuery getJSON()方法获取twitter用户的时间表:

$.getJSON(url , function(data) { 
        console.log(data);
});

我在https://dev.twitter.com/oauth/tools/signature-generator/7804081?nid=731上生成了'url',我就像这样保存了

var url =   'https://api.twitter.com/1.1/statuses/user_timeline.json?'+
            'count=2&screen_name=twitterapi&'+
            'Authorization:OAuth&'+
            'oauth_consumer_key=[here is my data],'+
            'oauth_nonce=[here is my data],'+
            'oauth_signature=[here is my data],'+
            'oauth_signature_method=HMAC-SHA1,'+
            'oauth_timestamp=1421914866,'+
            'oauth_token=[here is my data],'+
            'oauth_version=1.0' + '?callback=?';    

我得到了

{"errors":[{"message":"Bad Authentication data","code":215}]}

0 个答案:

没有答案