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 :
- updateProfileImage
- updateProfile
- getFriends
- getPublicTimeline
- …
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