开发者

Exclude keywords in Twitter Streaming API

Currently, I am using the Twitter streaming API to get realtime tweets for ce开发者_如何学JAVArtain keywords. However, I would like to skip tweets that are irrelevant before getting them.

With the Search API I can search for "hello -john" so I only get tweets that contain the word hello, but not John or I can search for "hello Maria OR Andrew" so I get only tweets that contain the word hello AND either Maria or Andrew.

With the Streaming API, I can only give keywords but is there a way I can use -john or things like OR in these keywords?


Unfortunately, there's no way to exclude keywords via the streaming API. The docs only specify the ability to add keywords to the search but not exclude. You'll need to filter words out in your code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜