Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need larger image to get pulled from facebook when user signs up

When a user signs up to my site their facebook profile image automatically gets pulled and used as their profile image. The image is tiny so it looks pixelated. Is there any way to pull a larger version of the profile image? The same also happens for users who sign up using twitter.

Thanks.

like image 823
Jon Farrugia Avatar asked Apr 08 '11 16:04

Jon Farrugia


People also ask

Why is it important to know the correct Facebook images sizes?

In an age when consumers are inundated with visuals, there’s no overstating the importance of knowing the correct Facebook images sizes so that the images you post to Facebook are as engaging as can be.

How do I make a picture Bigger on Facebook?

Use your photo editing software to re-size the picture to make it bigger or find a free online "picture resizing" website to do it. I dont think you can do it within Facebook.

Why does my Facebook photo look blurry?

So, how does blurriness happen? In short, Facebook automatically resizes and reformats photos to fit its technical specifications. This means that if you post a photo that’s too small, it will enlarge to fit the space, and if your photo is too big, it will shrink down.

What is the best size for a Facebook post?

The recommended image size for a standard Facebook post is 1200 x 630. Shared images will appear in your followers’ feeds at a maximum width of 470 pixels, and on the page at a maximum width of 504 pixels. In both cases, it will scale to a ratio of 1:1. Remember, Facebook will crop the image in order to provide a preview to users.


1 Answers

You can use the different options on the graph api to get images of different sizes and shapes:

http://graph.facebook.com/{{ user.uid }}/picture?type=small
http://graph.facebook.com/{{ user.uid }}/picture?type=normal
http://graph.facebook.com/{{ user.uid }}/picture?type=large
http://graph.facebook.com/{{ user.uid }}/picture?type=square

Unfortunately none of them are too large. Getting the full size pictures is a bit more complicated. You need to actually go in and get a list of the user's albums: https://graph.facebook.com/[uid]/albums?access_token=[AUTH_TOKEN] For which you'll need the user_photos permission. You'll then need to parse this result and look for an album with name Profile Pictures and type profile. After that you can get the photos from this album via https://graph.facebook.com/[ALBUM_ID]/photos?access_token=[AUTH_TOKEN] and then parse the json result to get the first photo in full size.

like image 61
Eric Conner Avatar answered Sep 27 '22 20:09

Eric Conner