iatek / jquery-socialist

jquery social media plugin that aggregates and combines Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest and.. Combine social feeds from multiple social networks or RSS in elegant layouts via this social plugin.
http://plugins.in1.com/socialist
MIT License
628 stars 213 forks source link

Doesn't work in IE? #5

Open mikemedoro opened 12 years ago

mikemedoro commented 12 years ago

I'm getting the following error when viewing in IE 7 and 8 "Object doesn't support this property or method" and it's telling me that this is the line causing the problem: networks.forEach(function(item) {

I'm even seeing this error on the demos provided.

iatek commented 12 years ago

I fixed this by adding an Array.prototype for IE so that the various calls to indexOf don't fail. I also removed the forEach and replaced it with simple for loop.

The plugin will now work in IE, unless any of the ajax calls fail. There is a lingering problem with jQuery Ajax, $.when() and IE that I've not yet been able to resolve. The Facebook and YouTube calls are failing with IE, so the plugin will fail in IE if either of these are used.

I will try to fix this shortly.

kamov commented 12 years ago

Does this issue is fixed?

dschmidthawk commented 12 years ago

I'm unable to see any example in IE 9, and all but COMBINE FACEBOOK, TWITTER AND LINKEDIN UPDATES examples from your demo page in Chrome. Are there specific browser issues?

danpep commented 12 years ago

I noticed that facebook and youtube were set to dataType:"json" instead of jsonp. I changed it on the facebook section and it worked in IE for me. This "MAY" be why you are having trouble with just those 2 feeds.

kamov commented 12 years ago

danpep very nice solution if you fix this issue! so now fb work on IE? can you show me where you change code?

kamov commented 12 years ago

I can't see "jsonp" anywhere

danpep commented 12 years ago

in the version I downloaded, around line 330 has the following: facebook:{url:'http://graph.facebook.com/|id|/photos?limit=|num|',img:'',dataType:'json',parser:{

I changed it to dataType:'jsonp' and it worked in IE

kamov commented 12 years ago

Hi,

I can't get it work....

I test with {name:'facebook',id:'thebeatles'}

danpep commented 12 years ago

kamov, I am assuming you made the suggested change in jquery.socialist.js, not the file where you declare the feeds.

kamov commented 12 years ago

Yes, I made change on plugin file.

check this demo online: http://uovodiluc.ch/t/index.html

danpep commented 12 years ago

You seem to be using an older file. download the latest code and change that, or grab my branch. There was a previous fix for the foreach loop around line 46 that is still in your code.

kamov commented 12 years ago

I update the file and your change, but is not yet fixed, check: http://uovodiluc.ch/t/index.html

danpep commented 12 years ago

compare your copy to: https://github.com/iatek/jquery-socialist/blob/master/jquery.socialist.js I still see you are using an older version. For example: line 46 should not be " networks.forEach(function(item) {"
it should be: " for (var i = 0; i < networks.length; i++) {" That's just one example. Are you sure you pushed the .js? Is there a better place to discuss this than on this thread?

kamov commented 12 years ago

I download full package. Seem that last version is not correct. Can you tell me where I can download your modify version?

I take this copy: https://github.com/iatek/jquery-socialist/blob/master/jquery.socialist.js but nothing change.

I don't know any other place where discuss about this plugin.

There is twitter and facebook page, but is not right place.

danpep commented 12 years ago

Ahhh.. I see, make all your dataTypes jsonp. you did it to facebook but not rss: and flickr: I missed those because I was just using facebook and twitter.

kamov commented 12 years ago

Hi,

Now work fine on IE! Big thanks.

However work on IE, but don't show Facebook Feed on IE.

check: http://uovodiluc.ch/t/index.html

I have notice that on line 33 there json, should be change to jsonp?

processList.push(helpers.doRequest(settings.feed,"json",function(q){

the sam on line 636 on the script CROSS DOMAIN AJAX

o.dataType = 'json';