Fixed by specifying width and height of FBRequestConnection Parameters.
/**
* Try to fetch an avatar
*/
- (void) sessionStateChanged:(NSNotification*)notification {
if ([[self account] useFacebookAuthentication]){
// Try and fetch an avatar
if ([[FBSession activeSession] isOpen]) {
// First up, get the facebook User data
[FBRequestConnection startWithGraphPath: @"me"
parameters: [NSDictionary dictionaryWithObject: @"picture.width(200).height(200)" forKey: @"fields"]
HTTPMethod: @"GET"
completionHandler: ^(FBRequestConnection *connection, id<FBGraphUser> fbuser, NSError *error) {
if (!error) {
// Set Avatar to account
[[self account] setAvatar:[fbuser objectForKey:@"picture"][@"data"][@"url"]];
// Update cell
NSIndexPath *mypath = [NSIndexPath indexPathForRow:0 inSection:0];
DashboardCell *cell = (DashboardCell *)[[self tableView] cellForRowAtIndexPath:mypath];
[cell updateUI];
} else {
NSLog(@"FB error %@", error);
}
}];
}
}
}