|
How to get the "farm" attribute of a photo? Please help!
 |
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
)
|
 |
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
)
|
 |
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
)
|
 |
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
)
|
 |
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
)
|
 |
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).
|
|