使用以下脚本,推文窗口打开但是推文活动没有被调用。我怎么绑定
window.open to tweet window:
var TWTShare = function() {
var title = metadata.title,
url = metadata.url,
text = metadata.text,
href = "https://twitter.com/intent/tweet?url="+encodeURIComponent(url)+"&title="+encodeURIComponent(title)+"&text="+encodeURIComponent(text);
window.open(href, 'share it on twitter', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, copyhistory=no, width='+width+', height='+height+', top='+top+', left='+left);
}
twttr.events.bind('tweet', function (event) {
console.log('tweet');
});