Chrome browser: Facebook API Error Code: 191 when invoking Requests dialog-Collection of common programming errors
I’m writing a Facebook canvas application that is using a basic Requests dialog. The dialog works fine when I call it from index.php, but I get Error 191 when I call the same code from any other file. (In my case, the code is in file2.php, which is invoked from a form in index.php and is located in the same directory). The error appears only in Chrome, and not in Firefox or IE, where everything works fine.
Instead of seeing the request dialog, the user gets: “API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri is not owned by the application.”
My configuration is as follows (please note that there is no spaces between “https:” and “//”):
App Domains: herokuapp.com
Hosting URL: https: //mybrokenapp.herokuapp.com/
Site URL: https: //mybrokenapp.herokuapp.com/
Canvas Page: http: //apps.facebook.com/mybrokenapp
Canvas URL: http: //mybrokenapp.herokuapp.com/
Secure Canvas URL: https: //mybrokenapp.herokuapp.com/
Page Tab URL: http: //mybrokenapp.herokuapp.com/
Secure Page Tab URL: https: //mybrokenapp.herokuapp.com/
The code that invokes the dialog:
FB.ui({method: 'apprequests',
to: 'nnnnnnnnn',
message : 'My message',
show_error: true
},
function (response){
if (typeof response == 'undefined')
alert('Request failed');
else if (response == null)
alert('Request canceled');
else
alert('The response was' + response);
}
);
Could anyone tell me how I can get this to work?