This project has moved and is read-only. For the latest updates, please go here.

How do I get the farm-id and server-id to display photo?

Topics: Developer Forum
Feb 5, 2010 at 4:39 PM

I am using to upload photos to Flickr. I have it working fine and it is returning me a photoid.

The problem that I am having is trying to build up a url to display the photo.

Looking at the documentation here, I want to build up a link in the following format:


I have the photoid, and secret, but how do I get the farm-id, and server-id using

Feb 8, 2010 at 9:58 AM

The library does all this work for you. Once you have the Photo or PhotoInfo instance returned by one of the Flickr methods then simply use the SquareThumbnailUrl, ThumbnailUrl, SmallUrl, MediumUrl or LargeUrl properties.


Feb 8, 2010 at 1:31 PM

Thank you Samjudson. I can't instantiate a Photo object with just the PhotoId. What are the other required parameters? Is there anywhere that I can find examples of how to use this library?



Feb 8, 2010 at 4:10 PM

The easiest way if you have just the photo ID is to call Flickr.PhotosGetInfo.

How are you getting the photo ID?

Perhaps showing us a bit of your code would help.


Feb 11, 2010 at 5:14 AM
Here is how I am getting the PhotoId:

supportedExtensions = ConfigurationManager.AppSettings["flickrSupportedExt"]; string currentExtension = System.IO.Path.GetExtension(flUploadImage.FileName); //check if the uploaded file is with supported extension if (supportedExtensions.ToLower().IndexOf(currentExtension.ToLower()) > -1) { try { //login via key and secret FlickrNet.Flickr account = new FlickrNet.Flickr(ConfigurationManager.AppSettings["flickrApiKey"], ConfigurationManager.AppSettings["flickrApiSecret"], ConfigurationManager.AppSettings["flickrToken"]); //authentication is done and now we can upload photo string photoID = account.UploadPicture(flUploadImage.FileContent, txtTitle.Text, txtDescription.Text, txtTags.Text , 1, 1, 1, FlickrNet.ContentType.Photo, FlickrNet.SafetyLevel.None, FlickrNet.HiddenFromSearch.Visible); lblInfo.Text = photoID; } catch (Exception ex) { lblInfo.Text = ex.Message; } } else { lblInfo.Text = "File with extension \"" + currentExtension + "\" is not supported.<br/>The supported extensions are:" + supportedExtensions; }




Feb 11, 2010 at 8:23 AM

Yes, Flickr.PhotosGetInfo is your best bet I reckon:

PhotoInfo info = account.PhotosGetInfo(photoID);

lblInfo.Text = info.SmallUrl;