Phil
Phil

Reputation: 1662

Twitter tweet button not working

I am putting the share buttons from the social networks onto my website and have spent some time trying to line them all up nicely and have just about managed it, but for some reason it won't allow me to click on the 'tweet' button anymore.

Can anyone suggest why this may be? When I remove the divs surrounding the 'tweet' button and the 'social network' div it works fine.

Thanks in advance for any help.

.social-network{
border:1px solid #000;
width:300px;
overflow:visible;
height:20px;
}

.fb{
float:left;
width:73px;
margin-right:12px;
}

.twitter{
float:left;
width:95px;
margin-right:12px;
}

.google{
float:left;
width:60px;
}



<div class="social-network">

    <div class="fb"><fb:like send="false" layout="button_count" width="150" height="80" show_faces="false"></div>

    <div class="twitter"><a class="twitter-share-button" data-text="this is the best website" data-count="horizontal">Tweet</a></div>

    <div class="google"><g:plusone annotation="bubble" size="medium"></g:plusone></div>

</div>

Upvotes: 0

Views: 2476

Answers (1)

Tom van der Woerdt
Tom van der Woerdt

Reputation: 29965

If memory serves, the <a> should have a href="https://twitter.com/share" attribute. The Twitter javascript file will then automatically find it and replace it with an actual button.

-edit-

Looked it up, the href attribute isn't actually needed. It is, however, very important that you include Twitter's widgets.js after the <a>.

Upvotes: 1

Related Questions