2

So, I'm using the Facebook JS SDK, and I keep getting 191:

Now, I have checked my settings, and everything seems to be in order. App Domain is set to my base domain (alehunt.com), and "Website with Facebook Login" => "Site URL:" is set to "http://www.alehunt.com". I'm not doing any canvas-related stuff.

When looking at the URL for the login dialog window produced by FB.login I'm quite surprised to see that redirect_uri does not point directly to my app, but instead goes via http://static.ak.fbcdn.net/connect/xd_proxy.php. I'm wondering if this is the reason for the 191 error.

Now, if I change that part of the redirect_uri to be my own everything seems to work just fine. The dialog is presented as it should.

The complete URL is https://www.facebook.com/dialog/oauth?api_key=MYAPPID&app_id=MYAPPID&client_id=MYAPPID&display=popup&domain=www.alehunt.com&origin=1&redirect_uri=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df2f3026b8%26origin%3Dhttp%253A%252F%252Fwww.alehunt.com%252Ff298bcee3c%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df3d63e980c&response_type=token%2Csigned_request&scope=email&sdk=joey

Can anyone shed some light on this? Why is the JS SDK insisting on setting all this in the redirect URI?

The error I'm seeing is:

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.

I'm testing in Chrome 21

Eirik Hoem
  • 1,310
  • 7
  • 14

1 Answers1

0

Turns out this was due to using a Facebook JS client which had been modified by Cordova (PhoneGap). Still not sure exactly what the issue was, but everything worked just fine when I moved over to loading the JS directly from Facebook.

Eirik Hoem
  • 1,310
  • 7
  • 14