Twttr.events.bind ‘tweet’ error on Internet Explorer


#1

does not work in Internet Explorer twttr.events.bind ‘tweet’ this. Please modify program.


#2

Can you provide more context? Is there a URL you can point to which exhibits this error?


#3

OK, I was as follows:


1. twitterApi.js File

window.twttr = (function (d,s,id) {
	var t, js, fjs = d.getElementsByTagName(s)[0];
	if (d.getElementById(id)) {return;} 
	js=d.createElement(s); 
	js.id=id;
	js.src="https://platform.twitter.com/widgets.js"; 
	fjs.parentNode.insertBefore(js, fjs);
	return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));

var TwitterApi = {
	getApp : function() {
		return this;
	},

	tweet : function(fnc) {
		twttr.ready(function (tw) {
			tw.events.bind('tweet', fnc);
		});
	},

	click : function(fnc) {
		twttr.ready(function (tw) {
			tw.events.bind('click', fnc);
		});
	}
};

2. html

<a class="twitter-share-button" href="https://twitter.com/share"
		  data-related="twitterdev"
		  data-size="large"
		  data-count="none">Tweet</a>

3. Call script

var tw = TwitterApi.getApp();
tw.tweet(function(result){
	alert("Tweeted");
});
tw.click(function(result){
	alert("click");
})

#4

I also cannot get this to work in IE 11.


#5

yeah same, Not working on IE 11


#6