You aren't signed in     Sign In    Help

Flickr API / Discuss

Current Discussion

Flickraw
Latest: 58 minutes ago
photos.search with interestingness-desc question and geo
Latest: 3 hours ago
Feed with links to formatted photos user
Latest: 25 hours ago
limiting agent
Latest: 2 days ago
c++ newbie question...
Latest: 2 days ago
Flickr Groopy - "Views nn" Group Photo Manager
Latest: 4 days ago
Flickr Authentication Broken?
Latest: 4 days ago
coding help please
Latest: 5 days ago
Idea for flash app, Does someone want to make it?
Latest: 5 days ago
Storing token into a database table
Latest: 5 days ago
flickR XML Schema
Latest: 5 days ago
findByLatLon vs. getLocation
Latest: 5 days ago
More...
spacer image

How to get the "farm" attribute of a photo? Please help!

view profile

sidjain says:

Hi,

I am using the AS3 API. When I call the getInfo() method from the Photos class and pass a photo ID, I get back every piece of information about the photo EXCEPT the "farm" number. I need the 'farm' number to construct a direct URL to the photo.

Does anyone know how I can get the 'farm' attribute for a given photo ID?
Posted at 3:49PM, 9 May 2008 PDT ( permalink )

view photostream

Silly Luis  Pro User  says:

It should be there; this is (part of) a typical response:

<photo id="xxxxxxxx" secret="xxxxxxxxxx" server="32" farm="1" dateuploaded="1125495148" isfavorite="0" license="0" rotation="0" views="64">

You should check the XML parser; perhaps it's not returning it. ??
Posted 2 months ago. ( permalink )

view photostream

sidjain says:

Ok it looks like the "farm" attribute is deprecated. I tried constructing the url WITHOUT the farm attribute, and it works just fine (Their servers actually figure out the farm number and redirect to the appropriate URL).

Flickr even removed the "farm' attribute from their XML response for getInfo:

www.flickr.com/services/api/flickr.photos.getInfo.html

Flickr team -- would be nice if you updated your documentation to reflect the new changes:

www.flickr.com/services/api/misc.urls.html
Posted 2 months ago. ( permalink )

view photostream

Silly Luis  Pro User  says:

It's not deprecated; what's happening, probably, is (IIRC) that the photo is in farm1, so it can be accessed also by the old style URLs (w/ out "farm").

You should be getting the farm parameter in the response. Do you have a example response where this is happening?
Posted 2 months ago. ( permalink )

view photostream

dopiaza  Pro User  says:

that the photo is in farm1, so it can be accessed also by the old style URLs (w/ out "farm").

IIRC, *all* photos can be got without specifying the farm, it's just that those outside of farm1 will get an HTTP redirect first.
Posted 2 months ago. ( permalink )

view photostream

Silly Luis  Pro User  says:

I didn't know (or remember) that . Thanks, dopiaza!
Posted 2 months ago. ( permalink )

Would you like to comment?

Sign up for a free account, or sign in (if you're already a member).

RSS 2.0 feedSubscribe to a feed of stuff on this page...</!!> Feed – Subscribe to Flickr API discussion threads
Add to My Yahoo!