0

Retrieving user's public photos in Flickr using FQL

Hello,
I am having Flickr username & I want to get all the public photos uploaded by that user using YQL as I want to create REST query that will result into XML & I will easily able to manipulate the data. Please help me how can I do this? Or suggest me if any another solution is there.

Thanks.

by
1 Reply
  • QUOTE (HITUL @ Aug 25 2010, 07:42 AM) <{POST_SNAPBACK}>
    Hello,
    I am having Flickr username & I want to get all the public photos uploaded by that user using YQL as I want to create REST query that will result into XML & I will easily able to manipulate the data. Please help me how can I do this? Or suggest me if any another solution is there.

    Thanks.


    In order to request photos from a flickr username you need to find out the user ID, the example below is based on the flickr username "popmonkey"

    SELECT id FROM flickr.urls.lookupuser WHERE url='http://www.flickr.com/photos/popmonkey/'

    Once you have the id you can query for public photos:

    select * from flickr.photos.search WHERE user_id='51035801340@N01'

    Then you can combine these queries into one:

    SELECT * FROM flickr.people.publicphotos(0,5) WHERE user_id in (SELECT id FROM flickr.urls.lookupuser WHERE url='http://www.flickr.com/photos/popmonkey/') AND extras='url_sq'

    have fun!
    0

Recent Posts

in YQL