VansFannel
VansFannel

Reputation: 45941

Facebook: obtain album id just created with Photos.createAlbum

I'm developing an iPhone app that creates a Photo Album to hold the pictures that the user is going to upload.

On - (void)request:(FBRequest*)request didLoad:(id)result { I'm trying to obtain the aid returned with this code:

else if ([@"Photos.createAlbum" isEqualToString: request.method]) {

        NSLog(@"[Photos.createAlbum:dialogDidSucceed] succeed");

        NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
        NSString *aid = [[NSString alloc] initWithString: [request.params objectForKey:@"aid"]];

        [prefs setObject:aid forKey:_ALBUMID];
        [prefs synchronize];

        //[prefs release];
        [aid release];

        if (pendingUploadImage) {
            [self btnUploadImage];
        }
    }

Here said that the aid is returned, but I don't know where.

How can I obtain album id?

Upvotes: 0

Views: 616

Answers (1)

Ole Begemann
Ole Begemann

Reputation: 135578

If anywhere, it must be in result, which is a dictionary containing the response data from the web service. It certainly cannot be part of the request (where your code assumes it is).

Upvotes: 1

Related Questions