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="http://twitter.com/share" class="twitter-share-button"
data-url="http://www.mysite.com"
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="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript">
twttr.events.bind('tweet', function(event) {
alert("Post Successful");
window.location = "http://www.url-to-redirect-to.com"
});
</script>