From a902902149bd69b89db1a01da276b0633b27df54 Mon Sep 17 00:00:00 2001 From: Rene Date: Fri, 15 Aug 2014 13:36:49 +0300 Subject: [PATCH] Fixed example.php so that it works with the current Flickr API Probably Flickr's API resopnse has changed since the initial commit of thsi project. Now the flickr.photos.getRecent gives result array one level deeper and photos are placed inside a new "photos" level. Also the flickr.people.getInfo output has changed and username is put inside a new array having a key "_content". --- example.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/example.php b/example.php index 8b409b4..639a4a4 100644 --- a/example.php +++ b/example.php @@ -18,13 +18,15 @@ $recent = $f->photos_getRecent(); -foreach ($recent['photo'] as $photo) { - $owner = $f->people_getInfo($photo['owner']); - echo ""; - echo $photo['title']; - echo " Owner: "; - echo ""; - echo $owner['username']; - echo "
"; +foreach ($recent['photos'] as $photos) { + foreach ($photos as $photo) { + $owner = $f->people_getInfo($photo['owner']); + echo ""; + echo $photo['title']; + echo " Owner: "; + echo ""; + echo $owner['username']['_content']; + echo "
"; + } } ?>