Search code examples
androidflickr

Get Owner Profile Image Flikr API


I am using flickr API in my project, everything is working fine but i stuck at point where I am not able to get user's profile picture.

For example i am getting below type response

<user nsid="12037949754@N01" url="http://www.flickr.com/people/bees/" />

But not getting user image URL , can any one please help me out?


Solution

  • It's really very simple to find out the profile picture of any user which is called buddyicons. The API format/syntax is:

    http://farm{icon-farm}.staticflickr.com/{icon-server}/buddyicons/{nsid}.jpg

    For example: http://farm9.staticflickr.com/8573/buddyicons/[email protected]

    Here in this example, icon-farm=9, icon-server=8573 and nsid=116479554@N04

    By default, the above example will give you default image of size 48*48(Each user has this size image may or may not exist large, medium images), but if you want large, medium, small profile pictures then just append _l, _m, and _s at the end of nsid respectively.

    For example: http://farm9.staticflickr.com/8573/buddyicons/116479554@N04_l.jpg

    Hope this help you and resolve your issue and might be useful to other users also who face the same issue.