2

When calling FB.login() in IE (any version), the popup auth dialog simply says:

An error occurred with <appname>. Please try again later.

The call works as expected in Chrome, Firefox, and Opera. Reduced test:

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

FB.login(...);

Demo here. It doesn't matter whether a Facebook account is already logged in or not; however, if the logged in Facebook account has already authorized the app (so no dialog needs to be shown), then FB.login() succeeds in IE and I'm able to call API functions.


Edit: Trying to authorize the app's admin account in IE yields a little more error detail:

API Error Code: 191

API Error Description: The specified URL is not owned by the application

Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.

Both Chrome and IE send a redirect_uri on s-static.ak.fbcdn.net.

IE: https://s-static.ak.fbcdn.net/connect/xd_proxy.php?version=3#cb=f1cd66d36136ac9&origin=https%3A%2F%2Fjosh3736.net%2Ffbec46a30660a9&relation=opener&transport=flash&frame=f1d03767721d88c

Chrome: https://s-static.ak.fbcdn.net/connect/xd_proxy.php?version=3#cb=f3cc233c94&origin=https%3A%2F%2Fjosh3736.net%3A8%2Ff29e5a7f9&relation=opener&transport=postmessage&frame=f1f640e58

It looks like the JavaScript SDK is dropping the origin's port. (Chrome has %3A8%2F [:8/] at the end of origin, IE only has %2F Reported as a bug.

Community
  • 1
  • 1
josh3736
  • 124,335
  • 26
  • 203
  • 248
  • Problem explained here: http://stackoverflow.com/questions/389456/cookie-blocked-not-saved-in-iframe-in-internet-explorer – Evgeny Dec 07 '11 at 15:04
  • @Evgeny: This isn't a cookie problem -- the login works if the app is already authorized or if the hosting page is served from port 80. I tried disabling IE's P3P enforcement (Options > Privacy) with no success. – josh3736 Dec 07 '11 at 15:28
  • What about the application configuration, canvas application urls need to be allows in developers.facebook.com/apps ... and they should NOT redirect to other pages. So check with some online redirection tool if the canvas url redirects or not. – Evgeny Dec 07 '11 at 15:59
  • @Evgeny: Nope. App URLs are correct, otherwise the call wouldn't work in other browsers. – josh3736 Dec 07 '11 at 17:02
  • Sorry for an off-topic but do you have application running on port **8**? – Juicy Scripter Dec 21 '11 at 18:38
  • @JuicyScripter: Yes, in a dev environment. – josh3736 Dec 21 '11 at 19:00
  • Oh, I see, this is probably why you depicted it on your user picture... – Juicy Scripter Dec 21 '11 at 19:05

2 Answers2

0

One of the bug submission comments recommended removing the channelUrl property in the object your passing to FB.init().

Just a theory, but you might also have success if you include the port number in your channelURL, instead of removing it.

Lachlan McD.
  • 1,672
  • 1
  • 16
  • 23
0

Facebook has confirmed that this is a bug in the SDK, and fixed the problem as of July 2012.

josh3736
  • 124,335
  • 26
  • 203
  • 248