我有这个js
var https = require('https');
var contador =process.argv[2]?process.argv[2]:'...';
var screen_name =process.argv[3]?process.argv[3]:'...';
var user_id =process.argv[4]?process.argv[4]:'...';
var options = {
host: 'api.twitter.com',
path: '/1.1/followers/ids.json/count/'+contador+'/screen_name/'+screen_name+'/user_id/'+user_id,
method: 'GET'
};
var req = https.request(options, function(res) {
console.log('Response is '+res.statusCode);
res.setEncoding('utf8');
res.on('data', function (datos_JSON) {
var datos=JSON.parse(datos_JSON);
});
});
req.end();
我得到以下错误,回复400,为什么?...
答案 0 :(得分:0)
你有很多问题:
以下是文档中的示例网址:https://api.twitter.com/1.1/followers/ids.json?cursor=-1&screen_name=sitestreams&count=5000