n92
n92

Reputation: 7592

Google plus one button error

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?

Upvotes: 6

Views: 6066

Answers (5)

EricL
EricL

Reputation: 959

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

Upvotes: 0

Sagar Rawal
Sagar Rawal

Reputation: 1442

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.

Upvotes: 0

Artur Lipiński
Artur Lipiński

Reputation: 69

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.

Upvotes: 0

Damir Zekić
Damir Zekić

Reputation: 15940

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.

Upvotes: 0

uɥƃnɐʌuop
uɥƃnɐʌuop

Reputation: 15083

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.

Upvotes: 2

Related Questions