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.
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.