<?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?
}
答案 0 :(得分:1)
我从未使用过该库,但根据Flickr API,该函数最初被称为flickr.people.getInfo
。
PHP类遵循此命名约定。我会试试
$userinfo = $api->people_getInfo($ownerId);
var_dump($userinfo['username']);
祝你好运!