Adam Green
Twitter API Consultant
adam@140dev.com
781-879-2960
@140dev

Twitter Database Programming

Now that the switch to the Twitter API version 1.1 is getting closer, I’ve been asked if it will break the 140dev Framework. The requirement to switch to OAuth for API requests won’t affect the Streaming API, so version 1.1 won’t have any immediate impact on the the 140dev framework. Twitter has assured us that [...]

When new Twitter consulting clients ask me to plan a tweet collection database, the first question they always ask is how much it will cost. I can give them a rough estimate for the cost of my programming time based on their desired features, but it is impossible to know how much server power they [...]

Most of the Twitter consulting I do involves some form of tweet collection and storage in a database. Even when clients approach me with this in mind, they hardly ever realize just how valuable tweet data can be. In fact, it is priceless in the truest sense of the word, because there is no way [...]

Delivering the new RSS feed We are finally ready to put the new Twitter RSS feed together based on the tweets we’ve collected in the database. Let’s review what Twitter normally delivers, and then we can try to improve it. The standard feed for @BarackObama is delivered with this URL: https://api.twitter.com/1/statuses/user_timeline.atom?screen_name=barackobama And here is what [...]

Collecting all new and old tweets for any user In the last installment of this tutorial you learned how to collect the most recent 100 tweets from a user’s timeline. We are almost ready to start delivering the RSS feed, but first I want to show you how to gather new tweets for the user [...]

Inserting a user timeline into the database Now that we have the database table ready, we have to loop through all the tweets returned by the statuses/user_timeline Twitter API call, and insert them. The database programming will be done with my db_lib.php library. This is a simple PHP class that I use for all of [...]

There seems to be a good amount of interest in the new set of tutorials I’ve started writing, and most of the code I produce interacts with a MySQL database, so I’m going to post the code for my standard database library here. This makes it easy for me to link to this post multiple [...]