问题描述:

What is the best way to "listen" to tweet with certain hashtags, and what is the best API to use from Twitter for this?

I am basically need to retrieve all tweets with certain hastags for a certain time period.

I am thinking the below methods:

  1. Search using the Twitter Search for the hashtags and poll to continue to get more result.
  2. Use the streaming API and filter out the result I want.

网友答案:

Option #2 is certainly better than option #1, since it guarantees that you will only get a given tweet once. With option #1 you'd have to implement your own uniqueness check to filter out any results that you have already seen. That can get expensive in terms of memory and/or performance.

Option #2 should also consume significantly less bandwidth for the same reason, and probably also allows you to better approximate a real-time data feed than polling would.

相关阅读:
Top