I'm looking for a way to let people connect with facebook when posting comments, and to use their facebook avatars as the avatar for the comments. How can this be done? Do I need to create a seperate user account for those people, or is their a way to simply store an avatar url for each comment that's posted?

1 Answer 1


Three simple steps to generate a Facebook Avatar:

  1. Create an extra field in your comment form for the user's facebook profile (see e.g. WP Engineer for a code example and how to)
  2. If the user filled out this field, get the facebook avatar (see this question)
  3. Replace the WP avatar with your facebook avatar if a fb profile url is set

All together in this Gist (PHP5.3 required!). Tested with WP3.5 and FireFox/Chrome

Hint: It is strongly advised to read the code comments. There are several informations how to configure the plugin e.g. in the functions.php.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.