Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Connect IE9 Javascript Error in all.js

When using Facebook Connect via the javascript library, I get the following javascript error.

SCRIPT5007: Unable to set value of the property 'fbCallID': object is null or undefined all.js, line 22 character 4141

If I trace it down in the script, it comes out this section of code. (Line 22 in all.js) Inside the popup function, this line gets executed.

else FB.UIServer.setLoadedNode(b,window.open(b.url,b.id,c));

This call SetLoadedNode the second parameter being the window.open. The problem I am seeing is that the window opens, but the value passed to setLoadedNode is null. Thus, the call to setLoadedNode(a,b) b is null causing it to fail on the b.fbCallID line

,setLoadedNode:function(a,b){
    FB.UIServer._loadedNodes[a.id]=b;
    if(a.params)b.fbCallID=a.id;
}

My FB.Init looks as follows

FB.init({
    appId:'xxxxxxxxx',
    cookie:true,
    status:true,
    xfbml:true,
    oauth:true
});

If the javascript error occurs, I am still able to log in. The problem it causes is that the Facebook connect popup window does not close after logging in. Presumably, it has something to do with this error.

Any insight on this would be appreciated.

like image 951
Ronnie Avatar asked Sep 08 '11 14:09

Ronnie


1 Answers

This is a known bug with the Facebook JS SDK. See Permission denied error in all.js, and Facebook bugs 19042 and 20168 for some workarounds. (Basically you have to monkey-patch Facebook's javascript until they fix the problem.)

like image 82
gmcnaughton Avatar answered Oct 23 '22 17:10

gmcnaughton