Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Exercises

Add an updateTweets method, which lets users manually reload the tweets each time they tap the tab bar item of the currently displayed view controller.
If you leave the Twitter application running, each network error results in an alert panel. Hundreds of alert panels might be queued up after a few hours. Once more than one error has occurred, the Twitter application should replace the currently shown alert panel with a single alert panel mentioning the number of errors encountered so far.
If you follow many people on Twitter, and set a high refresh rate, you’ll soon reach the 150 API calls limit because you’re making an API call per user. Twitter supports a friends timeline, which merges all your friends’ tweets into a single timeline and filters out their responses to other users. Because this book is not about Twitter, it introduces as few Twitter API calls as possible for its examples. MGTwitterEngine provides a getFollowedTimelineSinceID:startingAtPage:count: method to read the friends’ timelines. Use this method and the Twitter API documentation at http://apiwiki.twitter.com/Twitter-API-Documentation to create your own FriendTweetIterator to display your friends’ status. A real-world problem such as this one should take a day to work out, as it will involve rearchitecting some of the Twitter application.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial