Motyar

@motyar

Freelance Web Developer

Static Web Hosting, made easy

Nov 30, 2011

Open APIs for Profile Avatar Images

One of my friend Vineeth G S shared a Simple api for twitter avatar images on Twitter. I found it very usefull and want to share other such open APIs to get profile images for other social sites.

Simple api for Twitter avatar images

http://twitter.com/api/users/profile_image?screen_name=gsvineeth here "gsvineeth" is a Twitter username.
More example http://twitter.com/api/users/profile_image?screen_name=codeplayers

Open api for Facebook avatar images

Facebook graph APIs have an API for it.
https://graph.facebook.com/motyar/picture?type=large
https://graph.facebook.com/motyar/picture?type=square

Supported types are small, normal, large, square.


Open api for Google+ avatar images

I have shared this early in a post Fetch Google Plus Profile Picture using PHP
Simply its https://profiles.google.com/s2/photos/profile/116599978027440206136
Where "116599978027440206136" is my Google+ profile id, you can get your own by going to http://plus.google.com/me, It will redirect you to your profile and you can get the ID from URL.

You can use sz parameter to get a custom sized image something like
https://profiles.google.com/s2/photos/profile/116599978027440206136?sz=1000
or
https://profiles.google.com/s2/photos/profile/116599978027440206136?sz=100

Enjoy!!

Labels: , ,




By :