Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with Google +1 Button and Tweet Button

I'm trying to use the Google +1 Button and the Tweet Button on my site, but I can't get either to work properly.

For the Tweet button, it shows up as it should and tweets my site as it should. However, the tweet count stays at zero regardless of who tries it on whatever computer.

Additionally, the Google +1 Button does not seem to work properly either (all people who have tried it DO use an account that has access to Google Plus). For some, it works just fine and it get +1'd and adds to the count. For me, clicking the button results in a red exclamation mark instead and the count stays at zero even after someone else sees it as 1 or whatever else.

I've looked up the problems with the red exclamation mark and it seems to be some problem with a relative link? Not entirely sure how to fix it though, any input here would be greatly appreciated.

Twitter code

<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>

Google code

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone href="URL REMOVED"></g:plusone>
like image 786
tnw Avatar asked Oct 25 '22 06:10

tnw


1 Answers

Your twitter button won't show the count without you setting it in the link. data-count="horizontal" should give you a count to the right of the button.

To fix a relative link to the +1 button add href="YOUR PERMALINK"

like image 105
Covar Avatar answered Nov 15 '22 05:11

Covar