This groundbreaking book provides you with the skills and resources necessary to build web applications for Twitter. Perfect for new and casual programmers intrigued by the world of microblogging, Twitter API: Up and Running carefully explains how each part of Twitter’s API works, with detailed examples that show you how to assemble those building blocks into practical and fun web applications. You’ll also get a complete look at Twitter culture and learn how it has inspired programmers to build hundreds of tools and applications. With this book, you will:

  • Explore every component of a Twitter application and learn how the API responds
  • Get the PHP and MySQL code necessary to build your own applications, with explanations of how these ingredients work
  • Learn from real-world Twitter applications created just for this book
  • Discover the most interesting and useful Twitter programs–and get ideas for creating your own–with the book’s Twitter application directory.

Twitter offers a new way to connect with people on the Internet, and Twitter API: Up and Running takes you right to the heart of this technology.

Twitter API: Up and Running is a friendly, accessible introduction to the Twitter API. Even beginning web developers can have a working Twitter project before they know it. Sit down with this for a weekend and you’re on your way to Twitter API mastery.”
–Alex Payne, Twitter API Lead

Twitter API: Up and Running is a very comprehensive and useful resource–any developer will feel the urge to code a Twitter-related application right after finishing the book!”
–The Lollicode team, creators of Twitscoop

The purpose of Twitter API: Up and Running is to provide an introduction to using the Twitter API–the means to get at the rich Twitter data–to build web applications. This book has three main parts: an overview of the Twitter ecosystem and culture; background information on the languages and environment you need to create your applications; and working code for a suite of sample applications meant to get you started on your programming adventure. As Twitter lowers barriers to publication through its simplicity, so this book will provide easy access to the skills and resources you’ll need to build web applications for its API.

Kevin Makice

From Author Kevin Makice
One of the strengths of Twitter is its flexibility. Every information stream is unique and can be customized in the way that best fits the individual at that moment. Are you getting too much information? Unfollow some people. Do you not have time to tweet? Don’t. Want to chat with your two best buds for an hour and chase away all your other followers? Feel free. Because of this versatility, there are no universal rules for how to behave on Twitter; each user can control his own experience.

Meet the Sample Apps
This small suite of sample web applications is offered to you as a way to illustrate use of the Twitter API, the collection of web service methods that bring Twitter data into third-party programming. These applications explore some common reasons to access the API:
Administration Tool
A master account is needed to do things like send direct messages and conduct data mining on the backend. Unlike most of the user-driven tools, the master account must be available even when the account holder (you) isn’t around to log in. This simple tool allows the master account’s password to be saved to the database in a safe way. Only you will use this tool. In fact, without knowing the password attached to the master Twitter account, others shouldn’t be able to do anything with this application.
Tweet Publisher
This application is a straightforward status updater. To publish to your own timeline, enter your Twitter account information and a short 140-character message. After doing so, you will see a link to the new tweet.
Auto Tweet
Each member account can be associated with a single RSS or Atom feed, from which a new tweet will be automatically generated. There is an automated task associated with this application that checks each registered feed for new content in six-hour cycles and posts the most recent article.
Tweet Broadcast
This is an aggregation tool, where you can collect daily tweets from a handful of other Twitter members into a single RSS item. An RSS feed is generated that contains information for up to 20 days of activity, collected by an automated task that checks for new tweets once a day. Each member account can have one aggregation feed.
Tweet Alert
Tracking tweets based on keywords is made easy with the Twitter search API. Each member can list a few keywords in Tweet Alert and receive a notification when any of those terms appears in a public tweet. The content scans are performed every 15 minutes. If a match is found—and the member is following your master Twitter account—a direct message is sent to that member with a link to the search results.
Network Viewer
Probably the most useful among the suite of tools, this web application allows Twitter members to see the profile images of all the people they’re following. Private accounts are outlined in red, and (in most modern browsers) mousing over each picture reveals additional detail about that member.