1
votes

I'm currently using Addthis for my social media share / follow buttons, the problem I'm facing is on the twitter follow button I don't want it to display the username (so the button isn't so wide) I just want the word follow and the counter, I'm displaying this follow button like so on my site,

Twitter Follow

<a class="addthis_button_twitter_follow_native" tw:screen_name="myaccount"></a>

And once this has loaded I took a look at the source code and noticed that it loads a <span> element with the id #1 and inside that is a <b> tag and that's where the username is so I need to remove #1 b but when I try to do this with css #1 b { display: none !important;} or with jQuery $('#1 b').remove() its not working, does anyone have any suggestions or other approaches to this, thanks in advance for any help!

2

2 Answers

0
votes

Check Twitter api here...https://twitter.com/about/resources/buttons#tweet

You can customize your self there.

0
votes

To integrate followers count just use,

data-show-count="true"

and for removing user name from button,

data-show-screen-name="false"

Now it only shows the follow button and count of followers and here is the full code,

<a href="https://twitter.com/twitterapi" class="twitter-follow-button" data-align="left" data-show-screen-name="false" data-show-count="true">Follow @twitterapi</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>