我知道这个问题已经被问了又问,但我仍然无法让它发挥作用。
简单地说:我想将 Facebook 登录集成到我正在构建的网络应用程序中。我使用了 FB JS SDK 并成功加载,当我单击“登录按钮”时,它会打开一个弹出窗口,询问基本权限,然后......错误。
我进入 Facebook 仪表板,将站点重定向 URL 设置为:
http://localhost:8080/MyApp.
控制台在允许后给了我这个:
Blocked a frame with origin "https://www.facebook.com" from accessing a frame with origin "http://localhost:8080"
当我尝试从 https 访问时,我得到:
Blocked a frame with origin "https://www.facebook.com" from accessing a frame with origin "https://localhost:8080". The frame requesting access set "document.domain" to "facebook.com", but the frame being accessed did not. Both must set "document.domain" to the same value to allow access.
我看了又看,但没有任何帮助。
谢谢