javascripthtmlgoogle-plus-onetwitter-button

Google+ Button Mutates Tweet Button into another Google+ Button


I'm designing a web site where I've got a blog post and have the Facebook Like, Google Plus, Tweet buttons under the post. Google Plus documentation says that I should put the script at the head tag, but this just slows down the loading of my site, as sometimes my site won't load (white, blank page) until it loads the script for the Google Plus button (which sometimes takes about 3-4 seconds to connect and load completely). So I've (reading some recommendations on the web) taken the script tag to the bottom of my body tag (inside the body tag anyway).

Here is my code for the buttons:

    <div id="ExtrasBox">
                <table>
                    <tr>
                        <td>
                            <iframe src="http://www.facebook.com/plugins/like.php?app_id=192609804132243&amp;href&amp;send=false&amp;layout=button_count&amp;width=46&amp;show_faces=true&amp;action=like&amp;colorscheme=dark&amp;font=lucida+grande&amp;height=21"
                                scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 46px;
                                height: 21px;" allowtransparency="true"></iframe>
                        </td>
                        <td>
                            <g:plusone size="medium" count="false"></g:plusone>
                        </td>
                        <td>
                            <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
                            <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"
                                data-via="canpoyrazoglu" data-related="can16358p:kişisel hesabım">Tweet</a>
                        </td>
                    </tr>
                </table>
            </div>

I've also got the Google+ script at the end of body.

However, now I'm facing a very weird problem. SOMETIMES (and I have no idea what is the cause) when the page loads, my Tweet button will just change into a Google+ button. So the correct one is this:

correct one

But sometimes (I tried refreshing and full refreshing a few times but couldn't reproduce it right now, it was just like this photoshopped version) I am getting this:

wrong one

And the button just behaves like the Google+ button, inspecting in Firebug just shows me two Google+ buttons, and no trace of any Tweet button. I have my tags closed right (they are in different TD's anyway) and the weirdest thing is that this problem is just randomly occuring. It isn't happening now, but it happened multiple times (each individually after full refreshs etc.) today. I don't know if it has anything to do with the script tag being after the body either (putting the tag into head is no option for me, I don't want to delay my super-fast page load with about 4-5 seconds for a Google+ button), since the problem is NOT reproductable.

Any ideas of what can be the reason? Any useful/non dirty/hacky workarounds/solutions are welcome.


Solution

  • Just for everyone to know: I never had this issue ever again, I think it was most probably a temporary bug due to cache or a script. I've been testing the same site for days and it never happened again.