function getDataForTags($tags, $numPhotos = 18) { require_once dirname(__FILE__) . "/lib.phpFlickr.php"; $f = new tantan_phpFlickr($this->flickrAPIKey ? $this->flickrAPIKey : $this->flickrTanTanAPIKey); $recent = $f->photos_search(array('tags' => $tags, 'per_page' => $numPhotos)); $photos = $recent['photo']; $photos_url = 'http://www.flickr.com/photos/'; if (is_array($photos)) { foreach ($photos as $k => $p) { $img = $f->photos_getSizes($p['id']); $photos[$k]['photoSizes'] = $img; $photos[$k]['photoUrl'] = $photos_url . $p['owner'] . '/' . $p['id'] . '/'; } } return $photos; }
function request($command, $args = array(), $nocache = false) { $nocache = $nocache ? true : ($this->_tantan_useCache ? false : true); if ($this->getOption('hidePrivatePhotos')) { $args['privacy_filter'] = 1; if ($command != 'flickr.auth.checkToken') { $token = $this->token; //$this->token = ''; // just make an unathenticated call } } parent::request($command, $args, $nocache); if ($token) { $this->token = $token; } }