过滤推特4j流
我正在尝试使用以下代码过滤我的twitter4j流:
TwitterStream twitterStream = getTwitterStreamInstance();
// Listener
twitterStream.addListener(listener);
// Filter
FilterQuery filtre = new FilterQuery();
String[] keywordsArray = { "iphone", "samsung" };
filtre.track(keywordsArray);
twitterStream.filter(filtre);
// Listening
twitterStream.sample();
但结果是,例如:
27/59 - "Taking a risk over something only means that you want it more than anything"
28/63 - The more attractive you are, the more awkward I am.
29/64 - the thing about pain is that it demands to be felt
而且我没有恢复我想遵循的关键字,问题出在哪里?