For some reasons Facebook doesnt provide profile picture with user info dictionary/data.
We need to fetch profile pic using graph api.
Once user is done with successful authentication he can use following snippet to get profile picture URL.
[[FBRequest requestForMe] startWithCompletionHandler:^(FBRequestConnection *connection, NSDictionary<FBGraphUser> *FBuser, NSError *error) {
if (!error) {
NSString *userImageURLString = [NSString stringWithFormat:@"https://graph.facebook.com/%@/picture?type=normal", [FBuser objectID]];
}
}]
One can use type as small, normal, large, square as required profile picture.
0 Comment(s)