Take the 2-minute tour ×

I'm trying to get a profile picture from Graph API by calling me/picture or <friend_id>/picture. However it seems that the response that's given is not a JSON response. I haven't been able to read the response, but I know it's suppose to be another URL that links to the profile picture JPEG file.

I know that once I get that URL I can use UIImage method imageFromURL (or something like that) but I'm just not sure how to process the response. Can someone help?

share|improve this question

3 Answers 3

up vote 8 down vote accepted

You can make request like

[_facebook requestWithGraphPath:@"me/picture" andDelegate:self];

and your response handler

    if ([result isKindOfClass:[NSData class]])
        UIImage* profilePicture = [[UIImage alloc] initWithData: result];
share|improve this answer
Thank you, works pretty well! =) –  Enrico Susatyo Feb 10 '11 at 23:58

Mayb this would help you: How To Get a User Profile with Facebook’s New Graph API from your iPhone App

share|improve this answer
I read that blog post before, but he's just getting a first name and last name from Graph API, not profile picture =( –  Enrico Susatyo Feb 10 '11 at 12:48

If you want the URL and not the image data, then see my answer here: iOS Facebook Graph API Profile picture link

share|improve this answer

Your Answer


