O'Reilly logo

Sams Teach Yourself the Twitter API in 24 Hours by Chia Hwu, Jon Wu, Ben Ho, Christopher Peri

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

Hour 5. Making Your First API Call

What You’ll Learn in This Hour:

How to make a simple URL call

How to make a call in php

Making a Simple Twitter API Call

OK, it’s time make a call to Twitter and get a response. Let’s dive right in and make a simple call to the Twitter service to get the latest public timeline. Depending on your browser and its configuration you may need to view source to see the proper formatting.

Open a web browser, type in the following, and press Enter:

http://twitter.com/statuses/public_timeline.xml

You should get something like the following:

<statuses type="array"><status>  <created_at>Thu Dec 31 03:31:08 +0000 2009</created_at>  <id>7220013867</id>  <text>Lorem ipsum dolor sit amet, consectetur adipisicing elit, ...

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