无法在开发(本地主机)环境中调用 FB.ui



我曾经能够,但由于某种原因,我使用FB.ui()的所有Facebook Javascript API调用不再在我的开发环境中工作,我的url是localhost:8080。但在生产中它运行良好。我有一个开发环境的Facebook应用程序,但我只是改变了其中的url。我想这就是问题所在。我如何有一个Facebook应用程序,允许FB.ui()调用从开发和生产环境?这是我在dev:

中调用FB.UI()时得到的错误
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.

我总是在hosts文件中添加这样的条目:

127.0.0.1  dev.mydomain.com

然后在应用程序设置中设置我的应用程序域为mydomain.com(允许子域)。然后在您的浏览器中访问您的网站http://dev.mydomain.com:8080和FB。UI应该允许调用

最新更新