<?php include_once 'header_inc.php'; // Include needed files include_once "../../ScoopIt.php"; // Construct scoop var, which handle API communication $scoop = new ScoopIt(new SessionTokenStore(), "", $consumerKey, $consumerSecret); //profile url and shortName $topicId = $_GET["id"]; //Pagination $postPerPage = 30; $page = 0; if (isset($_GET["page"])) { $page = intval($_GET["page"]); } $topic = $scoop->topic($topicId, 0, ($page + 1) * $postPerPage, $page); //next and previous if ($page > 0) { $prev = "?id=" . $topicId . "&page=" . ($page - 1); } if ($topic->curablePostCount / $postPerPage > $page + 1) { $next = "?id=" . $topicId . "&page=" . ($page + 1); } include_once 'header_html.php'; ?> Your topic id is: <code><?php echo $topicId; ?> </code> <br/>
// to scoop.it servers to log the user in. // You can omit the call below if you want to use the api in "anonymous" // mode. $scoop->login(); ?> <html> <title>Scoop.it API Test</title> <body> <?php // Get the current user $currentUser = $scoop->profile(null)->user; // Display the current user name echo "<h1>Hello " . $currentUser->name . "</h1>"; // Get information about topic with 24001 lid (this can be also // called in anonymous mode). $topic = $scoop->topic(24001); echo "<h2>Information about topic: <img width='32px' src='" . $topic->mediumImageUrl . "' /><i> " . $topic->name . "</i></h2>"; echo "<p>Here is the print_r() output for the object \$topic:</p>"; echo "<center>"; echo "<textarea>"; print_r($topic); echo "</textarea>"; echo "</center>"; ?> <div id="footer"> <a href=" http://www.scoop.it"> <img src="http://www.scoop.it/resources/img/api/poweredbyscoopit_25_transp.png" /> </a> </div> <style type="text/css"> #footer {
<?php include_once 'header.php'; // Include needed files include_once "../../ScoopIt.php"; // Construct scoop var, which handle API communication $scoop = new ScoopIt(new SessionTokenStore(), "", $consumerKey, $consumerSecret); //profile url and shortName $topicId = $_GET["id"]; //Pagination $postPerPage = 30; $page = 0; if (isset($_GET["page"])) { $page = intval($_GET["page"]); } $topic = $scoop->topic($topicId, $postPerPage, 0, $page); //next and previous if ($page > 0) { $prev = "?id=" . $topicId . "&page=" . ($page - 1); } if ($topic->curatedPostCount / $postPerPage > $page + 1) { $next = "?id=" . $topicId . "&page=" . ($page + 1); } ?> Your topic id is: <code><?php echo $topicId; ?> </code> <br/> Your topic name is: <code><?php