I have this HTML:
when i click on the twitter icon element i need to open the “share on twitter” window i use this js for do that:
$("ul .twitter").on("click", function(e){
share.onTwitter();
});
share: {
onTwitter : function(url, title){
window.open("https://twitter.com/intent/tweet?url="+encodeURIComponent(url)+"&text="+encodeURIComponent(title)+ "&count=none/", "", "height=300, width=550, resizable=1");
return true;
}
}
end i try to bind the “tweet” event:
(include the twitter widget JS)
twttr.ready(function (twttr) {
twttr.events.bind(‘tweet’, function (event) {
console.log(“tweet”);
});
});
With this code i try to fire a function on tweet event for send to my DB the twitter share counter… but… my script never enter in the “tweet” handler!
How can i do that?!
(the window opens correctly end i can tweet my page)
Thx Mate.
Simone