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']; ...

Get Sams Teach Yourself the Twitter API in 24 Hours 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.