So I came across this Twitter account while I was wasting time on Failblog. I became very intrigued by it. The way it works is this person tweets ‘I think you mean “sneak peek”‘ whenever someone tweets something with the string “sneak peak” in it. And it is automated as I discovered by tweeting “Sneak peak” myself, and getting a response within seconds:

So my question is, how is this done?
- Can you get notifications somehow when someone tweets something containing a certain string? Consider that this already happens when someone tweets your username, so it is technically possible.
- Or does this person have a computer running all the time that searches twitter every few seconds for the string?
- Or are both possible?
This almost certainly uses the Twitter Streaming API.
So, there is a server somewhere which is continually streaming the Twitter API, filtered for the specific term.
Whenever the server sees a new tweet come through the stream, it tweets the response automatically.
So, to answer your questions:
1) Yes.
2) Yes, but it’s not constantly polling, it’s receiving the data automatically.