Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Finding Flickr Users' Photos and Information

Zend_Service_Flickr provides several ways to get information about Flickr users:

  • userSearch(): Accepts a string query of space-delimited tags and an optional second parameter as an array of search options, and returns a set of photos as a Zend_Service_Flickr_ResultSet object.

  • getIdByUsername(): Returns a string user ID associated with the given username string.

  • getIdByEmail(): Returns a string user ID associated with the given email address string.

Example 819. Finding a Flickr User's Public Photos by E-Mail Address

In this example, we have a Flickr user's e-mail address, and we search for the user's public photos by using the userSearch() method:

= new Zend_Service_Flickr('MY_API_KEY');

$results $flickr->userSearch($userEmail);

foreach (
$results as $result) {
$result->title '<br />';

Zend Framework