0

When using the Twitter site streaming API, one must provide keywords in order to initiate the streaming.

If I supply, for example, the keyword "great", would the streaming API return tweets containing something like "ABCDgreat"?

In other words; does the search terms are matched only when they are bounded by spaces?

Chedy2149
  • 2,821
  • 4
  • 33
  • 56

1 Answers1

0

The search terms are not bounded by spaces.

Using your example, if you provide the keyword "great", the API will return tweets containing "ABCDgreat" in their text. Not even if you put spaces before and after the search term, the effect is like a .trim(). If you need it, you'll have to cleanup afterwards.

You can find here some info from twitter, however it does not address exactly the situation you are describing.

I've been based on hbc for streaming.

lrnzcig
  • 3,868
  • 4
  • 36
  • 50
  • Thanks you @Irnzcig, but how are you so sure? Did you have previous experience with the API or did you got this information from an official source? – Chedy2149 Mar 24 '15 at 07:32
  • 1
    Fair point! I'm not a twitter employee, and I don't have a 20K reputation either! I've been downloading tweets for the last few weeks and that what I have experienced. Unfortunately, I haven't found an easy way to test the streaming api (as for the REST API, for which Twitter's webpage generates a curl command with your token to test your request). I've been using the library [hbc](https://github.com/twitter/hbc) for streaming (and I've coded myself for the REST API). To be strict, the behavior I'm describing could be due to the library (don't think so). I've added info in my answer, tough... – lrnzcig Mar 24 '15 at 09:30