MAXSTEELTURBOGO / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

GetAlbums with doGetImages=true fails if account has no albums or no images #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up an empty account or use some with no albums nor images
2. call GetAlbums with doGetImages = true
3.

What is the expected output? What do you see instead?
I expect the callback to be called with success=true and an empty array of 
albums.
However an Incorrect signature error is printed in the log.

Just check if we have albums before making the calls to getCovers or 
getImages
override protected function handleSuccess(result:Object):void
{
    albums = [];

    for each(var album:Object in result)
    {
        albums.push(new FacebookAlbum(album));
    } 

    //first we get the covers then the images
    if(doGetCovers && albums.length > 0)
        this.getCovers();
    else if(doGetImages && albums.length > 0)
        this.getImages();
    else
    this.onComplete();
}

Original issue reported on code.google.com by albertm...@gmail.com on 13 Mar 2009 at 2:01

GoogleCodeExporter commented 9 years ago
Also change the onGotCovers function

....

if(doGetImages && albums.length>0)
    this.getImages();

....

Original comment by albertm...@gmail.com on 13 Mar 2009 at 2:14

GoogleCodeExporter commented 9 years ago

Original comment by daniel.d...@gmail.com on 30 Mar 2009 at 5:12

GoogleCodeExporter commented 9 years ago
New release based of Facebook's Graph API is coming soon.  SDK which this issue 
depends on is no longer supported by Facebook.

Original comment by alan...@gmail.com on 29 Sep 2010 at 7:49