Raghu's SharePoint Corner: Twitter Widget IE8 Compatibility Issue

My blog has moved!

You will be automatically redirected to the new address. If that does not occur, visit
and update your bookmarks.

August 3, 2010

Twitter Widget IE8 Compatibility Issue

In this post I am going to talk about issue which i came across while integrating Twitter Widget in SharePoint 2010. This is most common requirement of integrating a twitter or any other widget into your SharePoint or any other community site.

There are many posts which will guide you on integrating Twitter widget into SharePoint site you can find some of them below given below
1.    http://www.endusersharepoint.com/2009/01/26/add-twitter-to-your-sharepoint-site/
2.    http://sharepoint.microsoft.com/blogs/mikeg/Lists/Posts/Post.aspx?ID=1202

Recently when I was integrating twitter widget with SharePoint 2010, I came across a issue where the tweets won’t scroll or you will see no tweets coming up in the widget section after integration. Initially I thought this might be a SharePoint 2010 issue  but later found out that all the tweets where coming up perfectly fine in other browser like Chrome and FireFox.

I noticed that there was a JavaScript error popping up at IE8 status bar. It was showing “Object doesn’t support this property or method” for the widget.js file. 

So this is an IE8 twitter widget compatibility issue.  Finally to conclude on this I also verified this with IE8 on of my colleagues machine for surprise the tweets where coming perfectly fine. So the problem was with IE8 version that was installed on the SharePoint Box. Please find the IE8 version details below.

Given below is the below are the steps which I took to fix this issue.
Step 1: Download the Widget.js file, this file is required for fetching the tweets
Step 2: Find Array.forEach in widget.js file and replace it withArray.prototype.forEach. You will find only one instance of this occurring
Step 3: Upload the Widget.js file to a document library and refer this link into the twitter widget javascript.

This will make your twitter widget work perfectly. If anyone has found any alternate solution please feel free to leave a comment..


Kyle Stedman said...

I've had the same problem, and I was glad to find someone who had a fix!

However, when I search http://widgets.twimg.com/j/2/widget.js, the word "array" isn't currently anywhere in it. Perhaps they've updated the .js file? Any ideas of what else to do? (I'm java illiterate....)


Raghavendra Shanbhag said...

@Kyle Stedman,

I just had a look at the Javascript, i guess it's not updated yet, you can still search for "Array.forEach" (not "array") and replace it with "Array.prototype.forEach".. Let me know if you are still facing the issue.

Ann said...

I tried your solution facing the same IE8 problem but replacing the .js file and the Array does not work for me. Any other solutions?

Anonymous said...

I changed my array line as suggested, but that didn't fix my problem. Any other ideas?