Twitter Streaming API - Node.js returning unauthorised error (OAuth)

I'm attempting to connect to Twitters Streaming API over OAuth using http.get although I'm having a slight problem.

The script keeps returning unauthorised

The code I'm using follows, can anybody tell me if I'm missing something stupid or my headers are incorrect.

var https = require('https');

var options = {
  host: 'stream.twitter.com',
  path: '/1.1/statuses/filter.json?track=bieber',
  method: 'GET',
  headers: {
      authorization: '
        OAuth 
        oauth_consumer_key      =   "", 
        oauth_nonce             =   "", 
        oauth_signature         =   "", 
        oauth_signature_method  =   "HMAC-SHA1", 
        oauth_timestamp         =   "", 
        oauth_token             =   "", 
        oauth_version           =   "1.0"
      '

  }
};

var req = https.request(options, function(res) {
  res.setEncoding('utf8');
  res.on('data', function (chunk) {
    console.log(chunk);
  });
});

req.on('error', function(e) {
  console.log('Oops... ' + e.message);
});

req.write('data\n');
req.write('data\n');
req.end();

The problem I had here was that the OAuth request was NOT being signed, which ment the authorisation was failing.

OAuth is a complicated process and it's best to use a library or NPM module that has already been developed.

The particular NPM I used in this instance was node-oauth

try this:

var options = {
  host: 'stream.twitter.com',
  path: '/1.1/statuses/filter.json?track=bieber',
  method: 'GET',
  auth : "YOUR_ID:YOUR_PASS"
};
var https  = require('https');
https.get(options,function(res){
   res.on("data",function(trunk){
        //YOUR CODE
   }).on("end",function(){
        //YOUR CODE
   }).on("error",function(e){
        //YOUR CODE
   });
}