Return to Snippet

Revision: 23112
at January 30, 2010 13:37 by maryann


Initial Code
function tweetCount($url) {
	$content = file_get_contents("http://api.tweetmeme.com/url_info?url=".$url);
	$element = new SimpleXmlElement($content);
	$tweets = $element->story->url_count;
 	echo $tweets." tweets!";
}

// template tag

<?php tweetCount($post->permalink); ?>

Initial URL

                                

Initial Description

                                

Initial Title
Amount of Tweets

Initial Tags
wordpress, twitter

Initial Language
PHP