Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Profile Picture Large

I am having trouble trying to request the large version of the users profile picture on Facebook.. in my graph path I'm doing:

NSString *requestPath = @"me/?fields=first_name,last_name,gender,email,birthday,verified,picture";

The picture field in there only gives me the small version of the profile picture, but i need the large and the normal version.. i already tried changing picture to picture_large, pic_large, image_large but none of this works..

Please, i already read the documentations, so don't bother answering if you plan on telling me to read it again.. I'm asking this here because i already searched everywhere and couldn't find a solution.

Thanks, Newton

like image 224
newton_guima Avatar asked Jun 04 '12 14:06

newton_guima


People also ask

How do I stop my profile picture from zooming in on Facebook?

Is There a Way to Prevent Facebook From Cropping My Profile Picture? The only way to prevent that is to make sure the image meets the recommended dimensions before you upload it. There is currently no way to prevent Facebook from cropping large profile pictures.

What size is a Facebook cover photo 2022?

Your Page's cover photo: Displays at 820 pixels wide by 312 pixels tall on your Page on computers and 640 pixels wide by 360 pixels tall on smartphones. Must be at least 400 pixels wide and 150 pixels tall.


2 Answers

The short answer you are looking for is picture.type(large)

I was looking for the same thing and found the answer using Facebook Graph API explorer found here.

Now if I use the following code:

[FBRequestConnection startWithGraphPath:@"me"
                             parameters:[NSDictionary dictionaryWithObject:@"picture.type(large),id,email,name,username"
                                                                    forKey:@"fields"]
                             HTTPMethod:@"GET"
                      completionHandler:^(FBRequestConnection *connection, id result, NSError *error){[self fbRequestCompleted:result];}];

the "picture" key in the "result" dictionary has the value of the large picture's URL.

like image 51
Murat Ögat Avatar answered Oct 31 '22 01:10

Murat Ögat


You can just use:

http://graph.facebook.com/USER/picture?type=large

Where USER can be either the user id or the user name.

That returns a redirect to the static image url, as written in the User object documentation:

HTTP 302 redirect to URL of the user's profile picture (use ?type=square | small | normal | large to request a different photo).

like image 37
Nitzan Tomer Avatar answered Oct 31 '22 02:10

Nitzan Tomer