Twitter Stream API - Should hashtag include #?

429 views Asked by At

I'm using TweetStream to use Twitter Streaming API. Talking with my colleagues (and also in my memory) when tracking hashstag the # should not be included, but I cannot find any indications about it anymore in the documentation.

Also in another stackoverflow question this rule is mentioned, but the linked page in Twitter Documentation does not shows this indication anymore.

It looks like that using TweetStream like this:

 TweetStream::Client.new.track('#term1', '#term2') do |status|
   puts "#{status.text}"
 end

works as expected. Can anyone confirm if this is the right way to setup a streaming client if I need to track #term1 and #term2?

1

There are 1 answers

0
Leb On

The Listening Center at my university does not use hash tags when tracking terms. But as you mentioned and in the documentation, using them will work if you're trying to match only #term1 and #term2 with no other variations.

So for example if you filter out tweets based on #term1 you won't get #term11. But if you filter tweets based on term1 you'll get any variation of term1 including both #term1 and #term11.