0

I am trying to write some code in php to show on a website exactly how many times a particular url has been tweeted on Twitter.

I assume I use the info in this page; http://api.tweetmeme.com/url_info?url=http://dori.co.nz/

But what code would I need to add to the header of a Wordpress theme to call those values?

Many thanks in advance!

4

1 回答 1

1
<?php
$url = "http://api.tweetmeme.com/url_info?url=http://dori.co.nz/"; 
$test = file_get_contents($url);

$xml = simplexml_load_string($test); 
echo $xml->story->url_count;
?>

Here we go.

于 2012-05-29T08:36:54.953 回答