<?php /** * Digg Lite reference application * * @author Bill Shupp <*****@*****.**> * @author Jeff Hodsdon <*****@*****.**> * @copyright 2009 Digg, Inc. * @license http://www.opensource.org/licenses/bsd-license.php FreeBSD * @link http://digglite.com */ require_once '../config.php'; require_once 'DiggLite.php'; $diggLite = new DiggLite(); try { $diggLite->digg(); } catch (Exception $e) { $diggLite->error($e); }
<?php /** * Digg Lite reference application * * @author Bill Shupp <*****@*****.**> * @author Jeff Hodsdon <*****@*****.**> * @copyright 2009 Digg, Inc. * @license http://www.opensource.org/licenses/bsd-license.php FreeBSD * @link http://digglite.com */ ini_set('include_path', '../PEAR:../lib:' . get_include_path()); require_once 'DiggLite.php'; DiggLite::$options = array('debug' => 0, 'apiKey' => 'key', 'apiSecret' => 'secret', 'apiUrl' => 'http://services.digg.com', 'apiEndpoint' => 'http://services.digg.com/1.0/endpoint', 'callback' => 'http://yourwebsite.com/callback.php', 'authorizeUrl' => 'http://digg.com/oauth/authenticate', 'cache' => 'CacheLite', 'cacheOptions' => array('cacheDir' => '/tmp/digglite/', 'lifeTime' => 60, 'hashedDirectoryLevel' => 2)); session_module_name('files'); session_start();
<?php /** * Digg Lite reference application * * @author Bill Shupp <*****@*****.**> * @author Jeff Hodsdon <*****@*****.**> * @copyright 2009 Digg, Inc. * @license http://www.opensource.org/licenses/bsd-license.php FreeBSD * @link http://digglite.com */ require_once '../config.php'; require_once 'DiggLite.php'; $diggLite = new DiggLite(); try { $diggLite->bury(); } catch (Exception $e) { $diggLite->error($e); }
<?php /** * Digg Lite reference application * * @author Bill Shupp <*****@*****.**> * @author Jeff Hodsdon <*****@*****.**> * @copyright 2009 Digg, Inc. * @license http://www.opensource.org/licenses/bsd-license.php FreeBSD * @link http://digglite.com */ require_once '../config.php'; require_once 'DiggLite.php'; if (!isset($_GET['oauth_token']) || !isset($_GET['oauth_verifier'])) { throw new Exception('Missing token or verifier'); } $diggLite = new DiggLite(); try { $diggLite->callback(); } catch (Exception $e) { $diggLite->error($e); }
<?php /** * Digg Lite reference application * * @author Bill Shupp <*****@*****.**> * @author Jeff Hodsdon <*****@*****.**> * @copyright 2009 Digg, Inc. * @license http://www.opensource.org/licenses/bsd-license.php FreeBSD * @link http://digglite.com */ require_once '../config.php'; require_once 'DiggLite.php'; $diggLite = new DiggLite(); try { $diggLite->main(); } catch (Exception $e) { $diggLite->error($e); }