09-01-2014, 07:39 AM
PHP Code:
<?php $tweet_txt = 'Tweet Text'; ?>
<div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.mysite.com" data-text="<?php echo $tweet_txt; ?>" data-count="none">Tweet</a>
</div>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript">
twttr.events.bind('tweet', function(event) {
alert("Tweet Successful");
window.location = "http://www.mysite.com"
});
</script>