Facebook Login throws Permission Denied

I am adding a Facebook login to my existing asp.net application. I added the Facebook login button on the login screen. Now I press the Facebook login button and in IE 9 throws a client-side exception in all.js on line 22: if(a.params)b.fbCallID=a.id;

Even after this exception, I see the Facebook login screen and can log in, and in the main browser window I get the auth.login event, so I can live with it.

But, if I have already logged into Facebook, I went to the page and clicked on the Facebook login button, I briefly see an empty pop-up window, then I get the same exception on the client side, and then I do not get any event in the main window browser, so I don’t know if the user is registered, so I can’t redirect them to another page.

I tried the channelUrl trick, but that didn't help.

Any suggestions on what's going on?

+7
source share
2 answers

I found this hack that fixed the problem for me; add this line right after calling FB.init() :

 // Hack to fix http://bugs.developers.facebook.net/show_bug.cgi?id=20168 for IE7/8/9 FB.UIServer.setLoadedNode = function (a, b) { FB.UIServer._loadedNodes[a.id] = b; }; 
+2
source

The reason this happens (from websites and documents I read, and believe me, I read LOT) is because IE refuses cross-site javascript and sees that all.js crosses the sandbox border. A good discussion is possible find here .

Some people say that adding the channel.html file works , but we tried all its tastes and did not succeed. (Remember that http or https must match the page sending the request.)

Microsoft refers to the same problem , and their advice is to add the site to trusted sites (which does not help). An old tip (from last year) is to add CP="HONK" as your compact privacy policy, but I think the error was fixed and it was related to the cookie.

It seems that what is happening with us is that the login actually continues, and the callback is called correctly, but the main thread, which should end outside the logical call, stops executing (due to an error). Thus, after entering the system, any functions outside the login are not performed.

If anyone has a way to get IE not to throw an exception or create a workaround for this problem, I desperately need it. Any information that I will be happy to provide, but the sample is here:

 enter code here code before login here... FB.login(function(response){ callback stuff here... This part fires. }); main thread stuff here... This fails because of permission denied error. 
0
source

All Articles