Write your own twitter mashup using the Twitter API

Thinking about writing your own twitter mashup using php ? But you don’t know how to get started ?

It’s easy , just download the following twitter wrapping class for PHP and have a look at the example code below :

This code will print out the latest replies you have received on twitter

<?
require_once(“lib/phpTwitter/twitter.php”);

$t = new twitter(‘YOUR_USERNAME’,'YOUR_PASSWORD’);

echo’<pre>’;

$replies = $t->getReplies() ;
for ($i = 0; $i < $count; $i++) {

$reply = $replies[$i][text];
echo $reply;
echo “</br></br></br></br>”;

}
// Print out the complete replies array
//print_r( $replies );

echo’</pre>’;

?>

Now you know already how to retrieve and print out your replies, then it will be only a matter of walking through Tijs his class to know what else you can do with his wrapper(class)!

Eg :

I am sure you will have your script running within this and an hour !

Note : Formatting code in WP seems like a tough job , so you will have to do it yourself :-)

Comments

One Response to “Write your own twitter mashup using the Twitter API”

  1. Twitter Search on May 26th, 2009 8:03 pm

    thats great that you are talking about the twitter api,a good example of searching with the twitter api is on twiogle.com because you can search on twitter and google at the same time.

Leave a Reply