For a project I want to collect all tweets containing a keyword and
store them in a database. I have built this functionality using the
search api but was missing tweets. I was told to switch to the
streaming API. You can see that post here:

Although using the search API was straight forward, even easy, I am
quite out of my league with this streaming API. In fact, I have never
worked with streaming data at all. I have read the documentation and
the only 2 examples I could find anywhere on the internet. There is a
PHP library called phirehose but
it only helps with the streaming connection. I am still at a lose as
to how to process the tweets.. The example included with the phirehose
library is the most complete example I could find but it states that
it is not ready for production. This example writes all the tweets to
a flat file which I guess can then be parsed and stored in a db. Is
this a necessary step? Could one go straight to the db? Can anyone
help me out? Of course any example of production ready code would be
amazingly cool but realistically if someone can point out what issues
need to be addressed in this code that could help a lot too.
Here is that example:

Maybe I am asking for too much. I know I probably am. I just would
love to have these tweets stored in my db and know that as it is now I
don't have the knowledge to confidently release code into production.
BTW, the keyword I am targeting is not very popular, ~200 tweets a
week and this project is just to indefinitely store these tweets and
display them on a web page. i am not building a client or anything
like that. Its a fairly small project.

This was the other example I worked on and although it worked, the
author states it is lacking some necessities:

Reply via email to