title: nodejs (twit) how do you follow a users LIVE twitter stream
body: <p>I am trying to get twit (<a href="https://www.npmjs.com/package/twit" rel="nofollow noreferrer">https://www.npmjs.com/package/twit</a>) to stream live tweets from specific twitter users.</p>
  
  <p>The code I have is </p>
  
  <pre><code>var stream = T.stream('statuses/filter', { follow: ['nodejs'] })
  
  stream.on('tweet', function (tweet) {
      console.log(tweet.text)
  })
  </code></pre>
  
  <p>but it gives the following error</p>
  
  <pre><code>Error: Bad Twitter streaming request: 406
      at Object.exports.makeTwitError (/Users/simoncarr/dev/node/nodeletetweet/scripts/get_mp_data/node_modules/twit/lib/helpers.js:74:13)
      at Request.&lt;anonymous&gt; (/Users/simoncarr/dev/node/nodeletetweet/scripts/get_mp_data/node_modules/twit/lib/streaming-api-connection.js:96:29)
      at Request.emit (events.js:187:15)
      at Gunzip.&lt;anonymous&gt; (/Users/simoncarr/dev/node/nodeletetweet/scripts/get_mp_data/node_modules/request/request.js:1083:12)
      at Object.onceWrapper (events.js:273:13)
      at Gunzip.emit (events.js:187:15)
      at endReadableNT (_stream_readable.js:1094:12)
      at process._tickCallback (internal/process/next_tick.js:63:19)
  Emitted 'error' event at:
      at Request.&lt;anonymous&gt; (/Users/simoncarr/dev/node/nodeletetweet/scripts/get_mp_data/node_modules/twit/lib/streaming-api-connection.js:99:14)
      at Request.emit (events.js:187:15)
      [... lines matching original stack trace ...]
      at process._tickCallback (internal/process/next_tick.js:63:19)
  </code></pre>
  
  <p>simply tracking words in a tweet works just fine, for instance the following code works OK.</p>
  
  <pre><code>var stream = T.stream('statuses/filter', { track: ['apples'] })
  
  stream.on('tweet', function (tweet) {
      console.log(tweet.text)
  })
  </code></pre>
  
  <p>The twitter documentation suggests that I should be able to simply replace track with follow.</p>
  
  <p><a href="https://developer.twitter.com/en/docs/tweets/filter-realtime/api-reference/post-statuses-filter.html" rel="nofollow noreferrer">https://developer.twitter.com/en/docs/tweets/filter-realtime/api-reference/post-statuses-filter.html</a></p>