O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making a Twitter API Request

But what goes in our request? If we take a look at the Twitter REST API 1.1 at https://dev.twitter.com/docs/api/1.1, we’ll find the call statuses/home_timeline, which is called via an HTTP GET, and which returns “a collection of the most recent Tweets and retweets posted by the authenticating user and the users they follow.” Not shown on this page, but fundamental to Twitter API calls, is the fact that we can append .json to get JSON-formatted results, or .xml to get XML. Foundation’s JSON parser is far easier to use than its XML parser, so our URL will be https://api.twitter.com/1.1/statuses/user_timeline.json. Note that as of January 2014, all Twitter API calls must use SSL, so our URLs will always start with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required