Skip to content

Commit 2768fdb

Browse files
samlbestsamlbest
authored andcommitted
Fix duplicate oauth param
1 parent 7459e7e commit 2768fdb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/twitter.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function Twitter (options) {
6161
{
6262
oauth: {
6363
consumer_key: this.options.consumer_key,
64-
consumer_secret: this.options.consumer_key,
64+
consumer_secret: this.options.consumer_secret,
6565
token: this.options.access_token_key,
6666
token_secret: this.options.access_token_secret
6767
}
@@ -233,7 +233,6 @@ Twitter.prototype.stream = (function () {
233233
request.socket.destroy();
234234
};
235235

236-
(function(state, savedParams) {
237236
request.on('response', function(response) {
238237

239238
// We've sent too many requests - cancel current request and retry in 10s
@@ -245,7 +244,7 @@ Twitter.prototype.stream = (function () {
245244
savedParams.pendingTimeout = false;
246245

247246
// Call stream again with latest parameters
248-
state.stream(
247+
stream(
249248
savedParams.method,
250249
savedParams.params,
251250
savedParams.callback
@@ -268,7 +267,7 @@ Twitter.prototype.stream = (function () {
268267
stream.emit('end', response);
269268
});
270269
});
271-
})(this, savedParams);
270+
});
272271

273272
request.on('error', function(error) {
274273
stream.emit('error', error);

0 commit comments

Comments
 (0)