I’ve discovered a handful of issues using the AS3 Flickr API in Flex 3 and AIR, and as a result I’ve made a number of tweaks, additions and bugfixes to the source code.
Aside from recompiling the SWC (see here), here are the bugs I’ve found and some of the changes I’ve made:
This method is used to return the credentials attached to an authentication token. If you’ve already gone through the login process in your application and are loading a saved auth token, this is the method you call to verify the token is still valid.
However there is a bug in the method parameters passed to the flickr.auth.checkToken API method.
Here’s the original method:
The problem is the fourth parameter; a boolean that determines whether the method needs to be signed. The value here is false, when in fact it needs to be true.
The updated method:
FlickrService, User Public Properties
These two classes contain a large number of public properties you’ll likely end up referencing in your application. For FlickrService, this includes the auth token and its associated permissions. For User, this includes the NSID, username and pro status of the authorized Flickr account.
While there’s nothing wrong with these classes, none of these properties are made [Bindable] by default. So if you reference any of these properties as a bindable value in a MXML component, you’ll need to modify the source code accordingly.
This is a property I added to the User class. It points to the buddy icon URL of the authorized Flickr user.
You can implement this in one of two ways. First, you could add a basic getter/setter to User, and then set the property in the result handler for a FlickrService.people.getInfo() method call:
Second, you could make the property read-only by adding just the getter to User and building the URL directly in the method:
I’ll update this post if I discover more bugs or make new tweaks to the API.