Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Facebook have a Gravatar like Service

I would like to use pictures from facebook if Gravatar does not have an image for the user on file. Can I do this through facebooks API?

like image 900
Luke101 Avatar asked Dec 10 '09 08:12

Luke101


People also ask

What is this new profile pic on Facebook?

New Profile Pic, also sometimes written as one word “NewProfilePic,” allows users to submit photos of themselves for an “AI-driven” update that makes them look like works of art.

Is Facebook Avatar public?

Your current profile picture and cover photo are public, so they can be seen by anyone on or off Facebook.

Why would someone have a Gravatar account?

Why Should You Use Gravatar? Gravatar saves you the trouble of uploading a new avatar for each blog you comment on. WordPress administrators can activate Gravatar on their sites to give commenters more brand visibility.


1 Answers

Take a look at the users.getInfo API method. If a user has installed your application, or "connected" to Facebook on your site through Facebook Connect, then you have access to profile information that includes versions of their profile picture.

If you don't have a session key for the user (ie, the user hasn't installed your app or connected via Facebook Connect), you can still get the "square" profile picture, which is one of the smaller versions. You can query for this directly using the API.

The easiest way overall is probably to use the fb:profile-pic tag and XFBML. You will have to install the Facebook Connect libraries to do this, but you don't need the user to log in or anything in order to get XFBML to work... as long as you have the Javascript library on the page and an API Key to use, it will work.

like image 116
zombat Avatar answered Oct 24 '22 03:10

zombat