/**
  * 
  */
 public function getElephpants()
 {
     //$r = RepositoryManager::getInstance()->moveToPatch();
     $r = getFlickr();
     return JsonResponseBuilder::success(array('Items' => $r));
 }
Example #2
0
    $output = "<p><strong>" . date('M d, y', $tweet['time']) . "</strong><br/>" . $tweet['description'];
    if ($tweet['media'][0]->media_url) {
        $output .= "<br/><img src='" . $tweet['media'][0]->media_url . "' />";
    }
    $output .= "</p>";
    echo $output;
}
// Instagram Example
echo "<br/><br/><h2>Instagram</h2>";
try {
    $instagram = getInstagram("ncstate", 10, 'thinkanddo');
} catch (Exception $e) {
    echo $e->getMessage();
}
foreach ($instagram as $one_gram) {
    if ($one_gram['url'] != null) {
        echo '<a href="' . $one_gram['url'] . '"><img width="200" src="' . $one_gram['img'] . '" alt="' . $one_gram['img'] . '"></a>';
    }
}
// Flickr Example
echo "<br/><br/><h2>Flickr</h2>";
try {
    $flickr = getFlickr('72157664311499396');
} catch (Exception $e) {
    echo $e->getMessage();
}
foreach ($flickr as $flick) {
    if ($flick['url'] != null) {
        echo '<a href="' . $flick['url'] . '"><img width="200" src="' . $flick['img'] . '" alt="' . $flick['title'] . '"></a>';
    }
}