1

I used to be able to, but for some reason all my Facebook Javascript API calls using FB.ui() no longer work in my development environment where my url is localhost:8080. In production it works fine though. I have a dev environment Facebook application, but I did just change URLs around in it. I assume that's where the problem is. How do I have a Facebook application that allows FB.ui() calls from dev and production environments? This is the error I get when calling FB.UI() in dev:

An error occurred with AppleTree dev. Please try again later.

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.
at.
  • 50,922
  • 104
  • 292
  • 461

1 Answers1

7

I always add a entry in my hosts file for something like:

127.0.0.1  dev.mydomain.com

And then set my app domain in the app settings to mydomain.com (to allow subdomains). Then access your site in your browser at http://dev.mydomain.com:8080 and FB.ui should allow the call.

bkaid
  • 51,465
  • 22
  • 112
  • 128
  • This is a good solution, but my issue was actually because a setting was changed in Facebook that I didn't realize would affect my dev facebook app. – at. Oct 11 '11 at 22:36
  • 2
    what was the setting if you dont mind sharing with us. I am sure community might benefit from it – Roman Nov 08 '11 at 07:22