Hi Danny,
The auth_token for the API explorer won't expire, but it isn't meant for
production use.
phpFlickr has a useful explanation of the auth API
http://phpflickr.com/docs/flickr-authentication/
and a tool for generating a token from your own API key and credentials
http://phpflickr.com/tools/auth/
Signature generation is slightly complicated – the api_sig is a hash of your
token, secret and API call parameters in a certain, specific order. I found
a Flickr library for the language I was working in (JavaScript) that would
generate the api_sig for me.
Cheers
Jim
On 19 October 2010 09:46, Birchall, Danny <[log in to unmask]> wrote:
> Hi Jim
>
> Apologies, it looks like it was an authentication issue after all. So
> while this call returns fewer records:
>
> http://api.flickr.com/services/rest/?method=flickr.photos.search
> &api_key=*api_key*
> &user_id=52767375%40N04
> &tags=object&extras=url_sq,tags,machine_tags,url_m
> &per_page=500
>
> this call (generated with the API Explorer, why did I not spot that
> before??) returns them all:
>
> http://api.flickr.com/services/rest/?method=flickr.photos.search
> &api_key=*api_key*
> &user_id=52767375%40N04
> &tags=object&extras=url_sq,tags,machine_tags,url_m
> &per_page=500
> &auth_token=*auth_token*
> &api_sig=*api_sig*
>
> However, knowing nothing about the auth methods -- do you know whether
> that method of authentication is likely to remain stable; will the
> auth_token expire?
>
> Thanks again so much for your help.
>
> Danny
>
>
>
>
> -----Original Message-----
> From: Museums Computer Group [mailto:[log in to unmask]] On Behalf Of
> Jim O'Donnell
> Sent: 18 October 2010 18:09
> To: [log in to unmask]
> Subject: Re: [MCG] Help! Flickr API conundrum....
>
> Hi Danny,
>
> We had the same problem building apps for Astronomy Photographer of the
> Year at the Royal Observatory - the Flickr search API returned fewer
> items than expected from searching the Flickr web site..
>
> Turned out Flickr safe search, which is enabled for anonymous searches,
> was to blame. Our solution was to use the auth API and sign all calls as
> a Flickr user. That's quite a big change to make to your app, I'm
> afraid, but it may solve your problem.
>
> One way to check if this is the same problem is to run your tag search
> on the Flickr site while logged in and logged out of Flickr.
>
> Cheers
> Jim
>
> On 18 October 2010 17:44, Birchall, Danny <[log in to unmask]>
> wrote:
>
> > Hi
> >
> > This is a slightly desperate plea for help with the Flickr API for an
> > application that has to be ready for a press view at 10am tomorrow, so
>
> > any thought you can devote to it will be very gratefully
> appreciated....
> >
> > When I look at my Flickr stream for images tagged 'object', I get 267
> > results:
> >
> > http://www.flickr.com/photos/wellcomecollectionthings/tags/object/
> >
> > however, if I try the same search via the API, I get only 224 results:
> >
> > http://api.flickr.com/services/rest/?method=flickr.photos.search&api_k
> > ey
> > =730e87f0c0a1b19e587ca1f8b57974df&user_id=52767375@N04&tags=object&per
> > _p
> > age=500
> >
> > (I'm searching the photostream of the same account for images taggged
> > object)
> >
> > The global settings on the account I'm searching gives permission for
> > 3rd party searches; individual images are all freely searchable; but
> > no method of searching for them seems to reveal them
> >
> > Is there any other reason why Flickr might be hiding these images from
>
> > the API but not elsewhere?
> >
> > Thanks very much in advance for any light you can shed on this...
> >
> > Danny
> >
> >
> >
> >
> >
> > Danny Birchall
> > Web Editor, Wellcome Collection
> > Wellcome Trust
> > Gibbs Building
> > 215 Euston Road, London NW1 2BE, UK
> > Tele: +44 (0) 207 611 8894
> > email: [log in to unmask]
> > www.wellcomecollection.org
> > www.twitter.com/explorewellcome
> >
> >
> >
> >
> > This message has been scanned for viruses by Websense Hosted Email
> > Security
> > - www.websense.com
> >
> > ****************************************************************
> > For mcg information visit the mcg website at
> > http://museumscomputergroup.org.uk/
> > To manage your subscription to this email list visit
> > http://museumscomputergroup.org.uk/email-list/
> > ****************************************************************
> >
>
> ****************************************************************
> For mcg information visit the mcg website at
> http://museumscomputergroup.org.uk/
> To manage your subscription to this email list visit
> http://museumscomputergroup.org.uk/email-list/
> ****************************************************************
>
> ****************************************************************
> For mcg information visit the mcg website at
> http://museumscomputergroup.org.uk/
> To manage your subscription to this email list visit
> http://museumscomputergroup.org.uk/email-list/
> ****************************************************************
>
****************************************************************
For mcg information visit the mcg website at
http://museumscomputergroup.org.uk/
To manage your subscription to this email list visit
http://museumscomputergroup.org.uk/email-list/
****************************************************************
|