Created
August 25, 2011 02:54
-
-
Save vivirenremoto/1169875 to your computer and use it in GitHub Desktop.
get avatars from gravatar, facebook, twitter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPhotoFacebook( $fb_id ){ | |
return 'http://graph.facebook.com/' . $fb_id . '/picture'; | |
} | |
function getPhotoGravatar( $email ){ | |
return 'http://www.gravatar.com/avatar/' . md5( $email ) . '?s=50'; | |
} | |
function getPhotoTwitter( $nick ){ | |
return 'http://api.twitter.com/1/users/profile_image/' . $nick . '.json'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment