Change in PEAR module first example

0 views
Skip to first unread message

Camilo Uribe

unread,
Jul 2, 2009, 1:46:42 PM7/2/09
to dig...@googlegroups.com
Hi:

Please someone change in http://apidoc.digg.com/ToolkitsServicesDigg
the first example to include the key and getting a working example.

It could be something like this:

<?php

require_once 'Services/Digg.php';

//The appkey argument must be a valid absolute URI (see IETF RFC 2396)
that identifies the application making the request
//more info at http://apidoc.digg.com/ApplicationKeys
Services_Digg::$appKey = 'http://www.mysite.com';

try {
$api = Services_Digg::factory('Stories');
$stories = $api->getAll(array('count' => 10));
foreach ($stories as $story) {
echo $story->title . '<br />' . "\n";
}
} catch (PEAR_Exception $error) {
echo $error->getMessage() . '<br />' . "\n";
}

?>

--
Eventos tecnología, un solo portal con todos los eventos
http://www.eventostecnologia.com

Reply all
Reply to author
Forward
0 new messages