Chapter 7. Maximizing Performance and Functionality
"The Twitter API is discoverable, intuitive, and easy to use, but don't overuse it or you will quickly find yourself up against the Twitter rate limits! It might surprise you how quickly API requests add up, so it's best to determine the frequency of your application calls early in the development cycle. When you do get around to calculating frequency, don't forget that some requests require more than one API call in order to build a complete result set. Neglect this point and your frequency projections could be way off and your users will suffer."
The Twitter API has limits, and a developer should know those limits to get the most out of their applications. This chapter covers caching, dealing with users with large numbers of friends and followers, and leveraging existing third-party Twitter services to extend the functionality of your projects. Some time will be spent describing a technique for mocking web service calls so that you can develop a Twitter application even when you're offline.
Caching
When working with API rate limits, it's important to reduce the frequency of calls made, especially when your requests are initiated on behalf of your users, either with their credentials or through OAuth. Twitter's API is structured so that data that relates to a user, such as his or her friends, followers, or recently received direct messages, are only accessible while impersonating the content owner's account. Because ...
Get Professional Twitter® Development With Examples in .NET 3.5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.