Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #38 from chemzqm/master
github oauth验证现在必须要有user-agent请求头,否则报错
  • Loading branch information
fengmk2 committed Dec 13, 2013
2 parents ae042da + c301d50 commit 3151f8f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/tbase.js
Expand Up @@ -16,6 +16,7 @@ var utils = require('./utils');
var OAuth = require('./oauth');
var emoji = require('emoji');
var EventProxy = require('eventproxy');
var pkg = require('../package');

/**
* TAPI Base class, support OAuth v1.0
Expand Down Expand Up @@ -686,13 +687,17 @@ TBase.prototype.verify_credentials = function (user, callback) {
type: 'GET',
user: user,
playload: 'user',
request_method: 'verify_credentials'
request_method: 'verify_credentials',
headers: {
'User-Agent': 'node-weibo/' + pkg.version
}
};
var url = this.config.verify_credentials;
this.send_request(url, params, callback);
return this;
};


TBase.prototype.user_show = function (user, uid, screen_name, callback) {
var data = {};
if (uid) {
Expand Down

0 comments on commit 3151f8f

Please sign in to comment.