Tuesday, February 28, 2017
Facebook Javascript SDK Security error Permission denied in IE while login
Facebook Javascript SDK Security error Permission denied in IE while login
Facebook platform is really not friendly with IEs browsers and Im sure that a lot of developers have many difficulties in IE while working with Facebook. Recently Ive faced a troubles in IE7 and IE8 while calling method FB.login(); Authentication popup appears but after that security error popup is shown with text like:
In other browsers everything works fine. There is a hack that allows to avoid this error in IE. It is necessary to add some piece of code after calling FB.init() on client side:
Message: Permission denied
Line: 22
Char: 4250
Code: 0
URI: https://connect.facebook.net/en_US/all.js
The trouble is described in Facebook Bugzilla: http://bugs.developers.facebook.net/show_bug.cgi?id=20168 Hope, it will be fixed by Facebook soon.
FB.init({
appId: xxxxx,
appSecret: xxxxxxxxx,
status: true
cookie: true
});
// this code solves the issue
FB.UIServer.setLoadedNode = function (a, b) {
FB.UIServer._loadedNodes[a.id] = b;
};
Available link for download