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 9. Building a Simple Twitter Client, Part I

What You’ll Learn in This Hour:

How to create a simple framework for our Twitter client

How to put tabs in HTML

How to support parameters in your framework

Expanding the Index File to Support Tabs

First, we need to add a few tabs to our index.php file so that we can select between reading home_timeline, mentions, and our direct messages. So, let’s create a new file called header.inc, and we will put it in the includes folder. By the way, it is not necessary to label header.inc with a .inc extension. This is a convention used by this Author.

To know what page the user wants, we passed that page identifier in the URL link and picked it up using the $_GET command:

<? $page = $_GET['page']; ...

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