flickrService.search result has blank urls?

2 views
Skip to first unread message

mason

unread,
Apr 15, 2008, 9:07:49 AM4/15/08
to ActionScript 3 Flickr Library
I'm trying to do a tag search for creative commons licensed images
(License.ATTRIBUTION) , and I'm sending and receiving the events fine.

I get a PagePhotoList object as the result of the event, which
contains all Photo objects, each with an id, title, secret....

but the "url", and "urls" fields are both null results, which is the
whole freekin point.

Is this a permissions problem in the License , or have I completely
missed how this is supposed to work?

Here is the code im using to initialize the search:


flickrService = new FlickrService(" API KEY");
flickrService.secret = " SECRET CODE ";
flickrService.addEventListener(FlickrResultEvent.AUTH_GET_FROB,
getFrobResponse );
flickrService.auth.getFrob();

private function getFrobResponse( event:FlickrResultEvent):void {
trace("getFrobResponse: success = " + event.success + "\n");
flickrService.addEventListener("photosSearch", searchResult);
}

public function search(key:String) : void {
trace("search key " + key );
flickrService.photos.search("", key, "any", "", null, null, null,
null, License.ATTRIBUTION, "", 10, 1);
}

public function searchResult(evt:FlickrResultEvent):void{

// WHERE PagePhotoList is returned, with blank urls!

dispatchEvent(new FlickrSearchEvent
( FlickrSearchEvent.SEARCH_SUCCESS , evt.data.photos ) );
}


Please, if someone sees where I'm going wrong with this thing, Please
let me know... I'm on a tight deadline for a project, and ANY AND ALL
HELP will be appreciated!


Thank you,
Mason
ma...@masonh.com

Theo Lagendijk

unread,
Apr 15, 2008, 9:20:22 AM4/15/08
to ActionScript 3 Flickr Library
Hi Mason,

I encountered the same problem. The photo objects with most of their
attributes unset where an unpleasant surprise for me too. Fortunately
the photo's id string is set. So you can use photos.getInfo or
photos.getSizes function to retrieve further information (like urls).

This is completely in line with the Flickr search API
http://www.flickr.com/services/api/flickr.photos.search.html (see the
example response part)

Hope this helps!
Theo.
Reply all
Reply to author
Forward
0 new messages