LoginSignup
2
0

More than 5 years have passed since last update.

Twitter Streaming API の follow パラメータには userName ではなく userID を入れろという話

Posted at

つまり

タイトルでもう全て終わってるんですが、そういうことです。
日本語で見つけられなかったので書いておきます。

You have to use the userID not the userName.
(あなたが用いるべきなのは userID であって userName ではない。)

こういうこと

BAD

app.js
client.stream( 'statuses/filter', { follow : 'maru8m' }, function( stream ) {
    stream.on( 'data', function( data ) {
        console.log( data.text );
    });
});

GOOD

app.js
client.stream( 'statuses/filter', { follow : 4893902929 }, function( stream ) {
    stream.on( 'data', function( data ) {
        console.log( data.text );
    });
});

でした

なんか Streaming API がそのうち死ぬというタイミングらしいですが
http://h.s64.jp/entry/2017/04/16/121647)
誰かの役に立つことを祈ります。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0