如何添加一个允许用户在我的网站上更改其Gravatar的链接?

时间:2022-11-29 22:53:15

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)

如何添加允许用户在我的网站上更改其Gravatar的链接? (与在Wordpress上更改Gravatar的方式相同)

Thanks, Kenneth

5 个解决方案

#1


3  

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.

如果您提供http://en.gravatar.com/emails/的链接,则会将其带到Gravatar网站,以便他们登录并更改其帐户。我不确定是否有任何其他公共API可以允许此更改。

#2


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:

看看wordpress.com上的html源代码,看起来他们正在使用像ThickBox这样的东西来加载iframe中的Gravatar网站:

<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>

#3


0  

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

Automattic的Gravatar API不提供此功能。您最好的选择是将用户链接到Gravatar网站。

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.

如果你真的想要你可以做一些CSRF的实验,我还没有测试过Gravatar网站是否可以防止这种剥削。最好的情况,它会很不稳定 - 我无法想象有人会像他们的Twitter帐户一样始终登录Gravatar帐户。

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

最后,您可以在iFrame中加载Gravatar网站,这样用户就不会真正离开您的域名。

#4


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/

应该可以使用XML-RPC实现化身的转换。该协议由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.saveData - 将二进制图像数据保存为此帐户的用户图像

  • grav.saveUrl - Read an image via its URL and save that as a userimage for this account
  • grav.saveUrl - 通过URL读取图像并将其保存为此帐户的userimage

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

因此,您需要自己实施更改,但您可以避免人们必须登录gravatar。

#5


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.

Gravatar不允许此功能。 WordPress.com可以做到这一点的唯一原因是因为它们都是来自Automattic的服务,并且它们都使用WordPress.com帐户,所以他们得到了一些额外的字符串。您最好的选择是链接到Gravatar网站,或者将其加载到iframe中。如果您将其加载到iframe中,它会提示他们登录到他们的WordPress.com帐户,除非他们经常使用WordPress.com,并且他们的浏览器仍然登录到该帐户。

#1


3  

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.

如果您提供http://en.gravatar.com/emails/的链接,则会将其带到Gravatar网站,以便他们登录并更改其帐户。我不确定是否有任何其他公共API可以允许此更改。

#2


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:

看看wordpress.com上的html源代码,看起来他们正在使用像ThickBox这样的东西来加载iframe中的Gravatar网站:

<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>

#3


0  

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

Automattic的Gravatar API不提供此功能。您最好的选择是将用户链接到Gravatar网站。

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.

如果你真的想要你可以做一些CSRF的实验,我还没有测试过Gravatar网站是否可以防止这种剥削。最好的情况,它会很不稳定 - 我无法想象有人会像他们的Twitter帐户一样始终登录Gravatar帐户。

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

最后,您可以在iFrame中加载Gravatar网站,这样用户就不会真正离开您的域名。

#4


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/

应该可以使用XML-RPC实现化身的转换。该协议由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.saveData - 将二进制图像数据保存为此帐户的用户图像

  • grav.saveUrl - Read an image via its URL and save that as a userimage for this account
  • grav.saveUrl - 通过URL读取图像并将其保存为此帐户的userimage

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

因此,您需要自己实施更改,但您可以避免人们必须登录gravatar。

#5


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.

Gravatar不允许此功能。 WordPress.com可以做到这一点的唯一原因是因为它们都是来自Automattic的服务,并且它们都使用WordPress.com帐户,所以他们得到了一些额外的字符串。您最好的选择是链接到Gravatar网站,或者将其加载到iframe中。如果您将其加载到iframe中,它会提示他们登录到他们的WordPress.com帐户,除非他们经常使用WordPress.com,并且他们的浏览器仍然登录到该帐户。