How to add a link that would let user change their Gravatar on my site?
Asked Answered
C

5

16

How do I add a link that would let user change their Gravatar on my site? (The same way you can change your Gravatar on Wordpress)

Thanks, Kenneth

Cata answered 26/3, 2009 at 8:10 Comment(1)
Did you manage to get this to work? How have you done it?Triboluminescence
V
4

If you provide a link to http://en.gravatar.com/emails/ it will take them to the Gravatar site where they can log in and make changes to their account. I'm not sure if any other public API that would allow this change.

Vitelline answered 26/3, 2009 at 8:15 Comment(1)
I was looking for a way where the user won't have to login again. Thanks for the answer anyway. :)Cata
D
1

Looking at the html source on wordpress.com, it looks like they're using something like ThickBox to load the Gravatar site in an iframe:

<a href="https://secure.gravatar.com/accounts/force-by-email/wpcom/username/somecode?TB_iframe=true&amp;height=475&amp;width=960" id="gravatar_ui" class="thickbox" title="gravatar.com" onclick="return false;">
   <img src="https://secure.gravatar.com/avatar/gravatarid?s=128&amp;r=any&amp;time=43179786" class="no-grav">
   <p style="text-align: center;">Change your Gravatar</p>
</a>
Dichromatism answered 18/1, 2011 at 23:35 Comment(0)
L
0

Automattic's Gravatar API doesn't offer this functionality. Your best bet is to link the user to the Gravatar website.

If you really wanted you could do some experimenting with CSRF, I haven't tested to see whether the Gravatar site protects against this exploitation. Best case scenario, it would be spotty - I can't imagine anyone stays logged into the Gravatar account at all times like they would their Twitter account.

Finally, you could load the Gravatar site in an iFrame, so the user doesn't really leave your domain.

Litmus answered 28/3, 2009 at 20:24 Comment(0)
C
0

It should be possible to implement the chaning of a avatar using XML-RPC. The protocol is specified by Gravatar: http://en.gravatar.com/site/implement/xmlrpc/

There is actually a call

  • grav.saveData - Save binary image data as a userimage for this account
  • grav.saveUrl - Read an image via its URL and save that as a userimage for this account

So you need to implement the changing by yourself but you can avoid people to have to login at gravatar.

Catarinacatarrh answered 19/1, 2011 at 1:40 Comment(0)
A
0

Gravatar does not allow this functionality. The only reason WordPress.com can do it is because they are both services from Automattic, and they both use WordPress.com accounts, so they got some extra strings pulled. Your best bet would be to link to the Gravatar website, or load it in an iframe. If you loaded it in an iframe, it would prompt them to log in to their WordPress.com account, unless they used WordPress.com frequently, and their browser stayed logged into that account.

Avogadro answered 24/2, 2015 at 20:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.