views:

205

answers:

1

Hello.

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?

+1  A: 

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).

Ole Begemann
Obviously. This is very embarrassing.
VansFannel