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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With