Services_Digg2
[ class tree: Services_Digg2 ] [ index: Services_Digg2 ] [ all elements ]

Source for file v2_0_user_getMyNews.php

Documentation is available at v2_0_user_getMyNews.php

  1. <?php
  2.  
  3. require_once 'config.php';
  4.  
  5. require_once 'HTTP/OAuth/Consumer.php';
  6. require_once 'Services/Digg2.php';
  7.  
  8. $hoc = new HTTP_OAuth_Consumer(
  9.     'key',
  10.     'secret',
  11.     'access_token',
  12.     'access_token_secret'
  13. );
  14.  
  15. $sd = new Services_Digg2;
  16. $sd->setVersion('2.0');
  17. $sd->accept($hoc);
  18.  
  19. $result $sd->user->getMyNews();
  20.  
  21. foreach ($result->stories as $story{
  22.     echo "Story: {$story->title}\n";
  23.  
  24.     foreach ($story->activity as $activity{
  25.         echo "\tFriend: {$activity->user->username} dugg/commented\n";
  26.     }
  27.  
  28.     echo "\n";
  29. }
  30.  
  31. ?>

Documentation generated on Mon, 11 Mar 2019 15:39:21 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.