Customize Tweet Button And Re-Direct


I am trying to customize the Tweet button, but still use the atributes and have the browser redirect after the post has been made. When I try to remove the twitter-share-button class, since I do not want to use the default button, the atributes do not work. And I know how to fix that, I would include them in the URL. Correct?

But the browser does not redirect if I remove that class. Please, any help would be greatly appreciated.

I am using the following code.

<div id="tweet-btn">
<a href="" class="twitter-share-button"
 data-text="This is my custom message"
 data-count="none">Tweet This</a>
</div><!-- tweet-btn -->

with the following javascript

<script type="text/javascript" src=""></script>
<script type="text/javascript">'tweet', function(event) {
       alert("Post Successful");
       window.location = ""




If you want to customize the Tweet Button in this way, you’ll have an easier time using the Tweet Web Intent instead. You’ll need to use parameters instead of HTML attributes to declare your configuration, though:


Thanks Taylor. I was looking at that before. And customizing the button, and having it post a default message was not the problem. The problem was having it also re-direct after the tweet was made.

I was able to do this with Tweet Web Intent. But it does not work when I customize the buttona nd remove the twitter-share-button class.


I don’t understand to this




do web intents allow you to show the count of messages? If not it would be a good feature request. That way I can have a customized button and show all the information possible.

Maybe there is already and API to get the count?


There’s no element for intents to show the count of messages nor a public API for you to obtain the count from. The only way to get the count is to use the full-on Tweet Button at this time.


@avexretweet thnx dude its working.


s2wy is here let them talk think wiser!!!


in case someone still looking