Member Sign In
Not a member?

A Wired.com user account lets you create, edit and comment on Webmonkey articles. You will also be able to contribute to the Wired How-To Wiki and comment on news stories at Wired.com.


It's fast and free.

Sign in with OpenID
Sign In
Webmonkey is a property of Wired Digital.
processing...
Join Webmonkey

Please send me occasional e-mail updates about new features and special offers from Wired/Webmonkey.
Yes No

Please send occasional e-mail offers from Wired/Webmonkey affiliated web sites and publications, and carefully selected companies.
Yes No

I understand and agree that registration on or use of this site constitutes agreement to Webmonkey's User Agreement and Privacy Policy.
Webmonkey is a property of Wired Digital.
processing...

Retrieve Sign In

Please enter your e-mail address or username below. Your username and password will be sent to the e-mail address you provided us.

or
Webmonkey is a property of Wired Digital.
processing...

Welcome to Webmonkey

A private profile page has been created for you.
As a member of Webmonkey, you can now:
  • edit articles
  • add to the code library
  • design and write a tutorial
  • comment on any Webmonkey article
Close
Webmonkey is a property of Wired Digital.

Sign In Information Sent

An e-mail has been sent to the e-mail address registered in this account.
If you cannot find it in your in-box, please check your bulk or junk folders.
Sign In
Webmonkey is a property of Wired Digital.

Flickr Baby Photo Clogs up the Tubes

baby.jpgWell, not all of them, but some. Two days ago all my Flickr importing tools mysteriously stopped working. At first I thought perhaps my Pro account had expired, but it turns out the problem was much more mundane. Since there are others out there that may well be scratching their heads, here’s your answer: Flickr reached the 2147483647 photo milestone earlier this week.

A gold star for those that recognize that number — don’t worry if you don’t, I didn’t either. It turns out that 2147483647 is the upper limit for signed integer data types. Thus if you’re using an open source library like Phlickr or similar to communicate with Flickr’s API, the photo IDs returned will simply disappear.

In my case I was storing Flickr IDs as PostgreSQL integers, which caused a similar problem since that’s the ceiling for PostgreSQL integers.

The solution is store Flickr photo ids as strings, which, despite sounding somewhat counter-intuitive, is actually what the Flickr API documentation has always recommended:

The Flickr API exposes identifiers for users, photos, photosets and other uniquely identifiable objects. These IDs should always be treated as opaque strings, rather than integers of any specific type. The format of the IDs can change over time, so relying on the current format may cause you problems in the future.

There’s a good chance your favorite Flickr API library has already been updated, so now would be a good time to download the latest copy and adjust your personal scripts accordingly.

[via Driftr]

See Also:

Post Comment Comments Permalink Print
Reddit Digg

 
Subscribe now

Special Offer For Webmonkey Users

WIRED magazine:
The first word on how technology is changing our world.

Subscribe for just $10 a year