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

What You’ll Learn in This Hour:

How to send a message to Twitter

How to send a direct versus a normal tweet

How to sanitize messages

Updating and Adding New Files to Support Input Text Field

Now that we have a simple Twitter client to read messages, we need to work on making our client application send messages. The good news is that we can still use our current framework with a few additional files. In addition, we will introduce a few JavaScript calls to support user interaction.

First, we need to add to our index.php file to allow a user to type in a message.

Edit index.php

Open the file index.php, and after this line:

<title>twitterAPI 24</title>

Add the following line:

<script type='text/javascript' ...

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