2011-06-16 1 views
0
<?php 
//... 

$tags = $api->photos_search(array(
    'text' => 'stuff', 
)); 

foreach ($tags['photo'] as $photo) { 
    // want to get get the user's actual username from the the "owner" 
    $ownerId = $photo['owner']; 
    // getUsernameById($ownerId); // <-- how do you do this? 
} 

Répondre

1

Je n'ai jamais utilisé cette bibliothèque, mais selon l'API Flickr, la fonction est appelée à l'origine flickr.people.getInfo.

Cette classe PHP suit cette convention de dénomination. Je voudrais essayer

$userinfo = $api->people_getInfo($ownerId); 
var_dump($userinfo['username']); 

Bonne chance!

+0

classy. Merci! – tester

Questions connexes