Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Commit

Permalink
Workaround for oauth producing illegal signatures with boolean conten…
Browse files Browse the repository at this point in the history
…t parameters
  • Loading branch information
jdub committed Feb 18, 2011
1 parent 377b470 commit 41ddb41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/twitter.js
Expand Up @@ -126,6 +126,12 @@ Twitter.prototype.post = function(url, content, content_type, callback) {
if (url.charAt(0) == '/')
url = this.options.rest_base + url;

// Workaround: oauth + booleans == broken signatures
Object.keys(content).forEach(function(e) {
if ( typeof content[e] === 'boolean' )
content[e] = content[e].toString();
});

this.oauth.post(url,
this.options.access_token_key,
this.options.access_token_secret,
Expand Down

0 comments on commit 41ddb41

Please sign in to comment.