use encoded auth header
authorDominique Hazaël-Massieux <dom@w3.org>
Wed, 31 Aug 2011 18:19:24 +0200
changeset 190 1bf9fc669e29
parent 189 ed0ff29fb0fe
child 191 7b0015a41e79
use encoded auth header
node.js/twitter.js
--- a/node.js/twitter.js	Wed Aug 31 18:18:14 2011 +0200
+++ b/node.js/twitter.js	Wed Aug 31 18:19:24 2011 +0200
@@ -72,7 +72,7 @@
 	}
     );
     stream.setHeader("Content-Type", "application/x-www-form-urlencoded");
-    stream.setHeader("Authorization", 'Basic ' + new Buffer(options.twitter_auth.name + ':' + options.twitter_auth.password).toString('base64'));
+    stream.setHeader("Authorization", 'Basic ' + twitter_auth);
     stream.write("follow=" + twitter_ids.join(","));
     stream.end();
 };