Amount of Tweets


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function tweetCount($url) {
  2. $content = file_get_contents("http://api.tweetmeme.com/url_info?url=".$url);
  3. $element = new SimpleXmlElement($content);
  4. $tweets = $element->story->url_count;
  5. echo $tweets." tweets!";
  6. }
  7.  
  8. // template tag
  9.  
  10. <?php tweetCount($post->permalink); ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.