Groups / Revish / Bug reports / Minor flickr bug - assumes URL = username

eatyourgreens says:

I add my flickr username to my profile - 'eat your greens' - and I get a link in the sidebar to
http://flickr.com/photos/eat%20your%20greens/
when my photos are at
http://flickr.com/photos/eatyourgreens/

danchamp says:

Eek, sorry, I'll get that fixed.

cherrypj says:

Also, not all user names are correct. Navigate to http://flickr.com/photos/cherrypj/, and you'll be rewarded with a 404. I assume it's because I don't have a paid account (shhh!).

danchamp says:

Hmm, that's a strange one. Your photo page on Flickr uses your internal Flickr id rather than your username, so it's:

http://flickr.com/photos/60743375@N00/

I'll see if I can find out why you're different. :-)

cherrypj says:

I just found out I hadn't set an alias for my screen name. Once I did so, http://www.flickr.com/photos/cherrypj/ became a valid address.

Anyway.

michael says:

I was just about to ask the same question(s), but I've been beaten to it.

Thanks for the tip, cherrypj - I'm a bit of a Flickr noob so I didn't have a clue where I was going wrong!

danchamp says:

I'll check out the Flickr API to see if I can detect this in future. Thanks for the info.

Those of you who use Flickr might be interested in the machine tags post I made on the Revish blog recently. It's not as scary as it sounds - just tag any book-related photo with book:isbn=1234567890 and the photo will automatically appear on the book's page and any reviews of that book on Revish.

eatyourgreens says:

If I edit my profile and put in 'eatyourgreens' for flickr username, I get back

There was a problem with your profile:

* Sorry, we couldn't find your Flickr buddy icon using that value.

which makes sense, I guess, since my flickr username is 'eat your greens'.

But if I put in the correct username, I still get a link to
http://flickr.com/photos/eat%20your%20greens/
which doesn't work, because the URL for my flickr photos isn't my flickr username.

eatyourgreens says:

Aha - you can look up the flickr NSID using flickr.people.findByUsername.

Once you have the NSID for someone, that allows you to get their photo URL via flickr.people.getInfo.

danchamp says:

Yeah, I use findByUsername to retrieve buddy icons, although I use findByEmail first as its a unique identifier across the two sites - it's perfectly possible that someone will register here with a username that exists at Flickr but isn't actually them. I plan to move to just using findByEmail for this very reason.

Anyway, the way the Flickr API works, those findBy methods give you access to a user's internal Flickr id, which is stored at Revish since it's needed for buddy icon retrieval. What I need to look into is if I can detect whether an alias has been set or not - if it hasn't the Flickr URL needs to use the Flickr id, otherwise it can use the Flickr username.

Interestingly the Flickr id works for all users too. So your Flickr photos can be found at:

http://flickr.com/photos/48335158@N00/

I'll get all this tidied up today. :-)

suncat says:

Here's a widget that retrieves your Flickr ID and profile URL:

www.xflickr.com/fusr/

Want to reply?

You must be signed-in to reply to group posts. Not got an account? Sign-up for free.