Otter API is a RESTful HTTP web service to Topsy. Topsy is a search engine that ranks links, photos and tweets by the number and quality of retweets they receive. The quality of retweets is determined by the influence of the Twitter users.
Below I have used PHP to display results of an Otter call which returns JSON. The results are for the most popular stories on wired.com today.
<?php
$data = json_decode(file_get_contents("http://otter.topsy.com/search.json?q=site:wired.com&window=d"));
foreach ($data as $name => $value)
{
echo $value->total.'<br />';
getAllItems($value->list);
}
{
foreach((array)$iarr as $itemName => $itemValue)
{
echo $itemValue->content.'<br />';
}
}
?>
No comments:
Post a Comment