<script >
function tweet(text, url){
var windowWidth=750;
var windowHeight=500;
var centerWidth = (window.screen.width - windowWidth) / 2;
var centerHeight = (window.screen.height - windowHeight) / 2;
var sharing_url=encodeURIComponent(url);
var tweetWindow = window.open('http://twitter.com/share?url='+sharing_url+'&text='+text,'tweet_share','resizable=0,width=' + windowWidth +
',height=' + windowHeight +
',left=' + centerWidth +
',top=' + centerHeight);
tweetWindow.focus();
return false;
}
</script>
Further I have experiences in tweeting a working url (with a public domain name) inside the tweet text. Twitter nicely identifies it as a link. Thanks.
No comments:
Post a Comment