I’ve got these facebook permissions set in my app:
NSArray *permissions = [[NSArray alloc] initWithObjects:
@"user_games_activity",
@"friends_games_activity",
@"publish_actions",
@"user_photos",
nil];
[[myDelegate facebook] authorize:permissions];
I’m making a request like so :
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"name,picture",@"fields",nil];
[[delegate facebook] requestWithGraphPath:@"me" andParams:params andDelegate:self];
And handling the response like :
else if([request.url rangeOfString:@"me"].location != NSNotFound)
{
NSString *username = [result objectForKey:@"name"];
NSLog(@"We think the username is %@", username);
helloGreeting.text = [NSString stringWithFormat:@"Hello %@", username];
NSString *pictureUrl = [result objectForKey:@"picture"];
NSLog(@"Now loading image [%@]", pictureUrl);
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:pictureUrl]];
profilePhoto.image = [UIImage imageWithData:data];
}
The log output I get is :
2012-06-26 15:10:49.002 FacebookIntegrator[10549:f803] We think the username is James Elsey
2012-06-26 15:10:49.003 FacebookIntegrator[10549:f803] Now loading image [http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif]

Question : Why does it obtain a default generic facebook icon rather than my own profile picture? Using the same access tokens on the Graph Explorer I can get to my profile picture image URL
The documentation for user_photos states :
Provides access to the photos the user has uploaded, and photos the
user has been tagged in
User profile picture do not require
user_photospermissions. Picture is likely coming from facebook cache, you should use following url for picture.