Adding a Twitter Feed with PHP

At my marketing web site www.marketingeda.com I wanted to add a Twitter feed using PHP and found something at twitter.slawcup.com/twitter.class.phps that does just that.

The PHP coding is very simple to use with this class:

include_once(‘classes/class.twitter.php’);

$t = new twitter;
$t->username = ‘marketingeda’;
$t->password = ‘********’;

$data = $t->userTimeline();

foreach($data as $tweet) {
print “<li>$tweet->text</li>
“;
}

Here’s the output result of this PHP script:

Leave a Reply