Publishing Tweets On A Page


I am trying to publish Tweets onto a page. Does anyone know how it can be done?

I have the following code but it doesn’t work.

		<div class="twittercellwhyev">

$feed = json_decode(file_get_contents(''));

$pattern = "/http:\\/\\/(www\\.)?([^.]+\\.[^.\\s]+\\.?[^.\\s]*)/i";
$replace = "<a href='http://\\\\1\\\\2'>http://\\\\1\\\\2</a>";

foreach($feed as $output) {

	<div class="twittercellinnerev">
echo preg_replace($pattern,$replace,$output->text);

	<div class="twitterwhyevimage">
	<a href=""  rel="nofollow" >
<img src="/images/followusontwitter.png" alt=""/>

You could look at

This does it via javascript rather than server side.

Thanks mate, that worked fine.

As a note for anyone looking at this from a Google search, it is worth looking at the Twitter API to see if these methods have been superseded by the new version of the API.

^^^^ this. Anonymous search is going away and twitter is killing any 3rd party widget it can. Still waiting on guidance as to how to do this come March.