Google加一个按钮错误

发布于 2024-12-04 16:26:52 字数 105 浏览 0 评论 0原文

我在我的网站上提供了 Google+ 按钮。当我单击它时,计数先增加然后减少并显示错误符号(红色感叹号)。几天来它工作正常,但现在它的行为像这样。

任何人都可以帮我解决这个问题吗?

I have provided the Google plus button in my website. When I click on it, the count increments then decrements and shows an error symbol (a red exclamation mark). For a few days it was working fine, but now it is behaving like this.

Can any one help me to solve this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

浅忆流年 2024-12-11 16:26:52

我的一个网站上也发生了同样的事情,但情况恰恰相反。一开始不起作用,几天后又起作用了。从那时起我就没有看到任何问题。我没有做任何事情来修复它(尽管我尝试过)。我浏览了互联网并阅读了有关该主题的 Google 文档,但我发现的唯一“帮助”是您需要确保您的个人资料没有被阻止。哪个个人资料不清楚,无论是用户的个人资料还是网站的个人资料,但我检查了两者(据我所知,它们没有被阻止)。不过,我并不感到惊讶,因为他们仍在解决这些问题。

如果没有其他人提出解决方案,请先等几天再解决问题。我会关注这个问题,因为我想听听你的问题最终是如何解决的。

I had the same thing happen on one of my sites, but the other way around. First it wasn't working, then after a few days it worked again. Since then I haven't seen any problems with it. I hadn't done anything to fix it (although I tried). I looked around the internet and read through the Google docs on the subject, but the only "help" I found was that you need to make sure that your profiles are not being blocked. Which profile wasn't clear, whether it be the user's profile or the site's profile, but I checked both (and they weren't blocked, as far as I could tell). I wasn't all that surprised, though, as they are still working out the kinks.

If no one else comes up with a solution, just give it a couple of days before you tackle the problem again. I'll keep an eye on this question, because I'd like to hear in the end how your problem works out.

难忘№最初的完美 2024-12-11 16:26:52

今天只在许多页面中的一页上遇到了同样的问题。

当更彻底地探索这个问题时,我发现其中一个响应包含 JSON,其错误哈希包含错误 400:“无效值”。

然后我发现一张图像(带有 itemprop="name" 的图像)包含空格。在转义它们和其他特殊字符后,按钮开始工作。

因此,请尝试验证您的页面并确保所有值均已正确转义。

Had the same problem today on only one of many pages.

When exploring the issue more thoroughly I found that one of the responses included JSON with error hash containing error 400: "Invalid value".

I then figured that an image (the one with itemprop="name") was containing spaces. After escaping them and other special characters, the button started working.

So, try to validate your page and make sure all values are properly escaped.

忘东忘西忘不掉你 2024-12-11 16:26:52

我认为 google +1 有时会禁止网站。有时我会因为页面未刷新而出错。当您添加+1时,您必须先登录,否则会弹出错误。

I think that google +1 sometimes banned websites. Sometimes I have error because page is not refresh. When you add +1 you must be logged first, otherwise error pops up.

风筝有风,海豚有海 2024-12-11 16:26:52

您只需要添加 data-href 属性,这样生成的 div 标签将如下所示。

<div class="g-plusone" data-size="medium" data-href="https://google.com"></div>

这里我添加了“https://google.html”。 com”作为该属性的 data-href 值。您可以根据您的要求更改它。

You just need to add the data-href attribute so the resultant div tag will be as folows

<div class="g-plusone" data-size="medium" data-href="https://google.com"></div>

Here I have added the "https://google.com" as a data-href value of that attribute. You can change it as per your requirement.

沦落红尘 2024-12-11 16:26:52

我也收到这个错误。对我来说,错误是由我的 +1 按钮标签上方(在 DOM 中)的 Twitter 脚本标签引起的。我将 Twitter 脚本移至页面底部,+1 按钮现在可以使用了。简而言之,似乎任何类型的 JS 都可以摆脱这种情况(当然),即使代码来自信誉良好的网站(Twitter)。

I was getting this error as well. For me, the error was caused by the Twitter script tag just above (in the DOM) my +1 button tag. I moved the Twitter script to the bottom of the page and the +1 button now works. In short, it seems any sort of JS could throw this off (of course), even if the code is from a reputable site (Twitter).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文