从今天开始,我们会在身份验证对话框中收到开发人员警告,其中包含以下消息:
You are using a display type of 'popup' in a large browser window or tab. For a better user experience, show this dialog with our JavaScript SDK without specifying an explicit display type. The SDK will choose the best display type for each environment. Alternatively, set height and width on your window.open() call to properly size this dialog if you have special requirements precluding you from using the SDK. This message is only visible to developers of your application.
我们有以下情况:
- 使用 javascript 我们打开一个新的弹出窗口
- 弹出窗口的 src 使用 Facebook 的 PHP-SDK 方法 getLoginUrl 设置
- 弹出窗口本身的大小为 400 像素 x 580 像素
PHP-SDK本身在其自己的代码中引用了“display=popup”的正确用法:
If you are using the generated URL with a window.open() call in JavaScript, you can pass in display=popup as part of the $params.
JS-SDK documentation说,打开的弹出窗口的最大尺寸应该是 400x580:
For use in a browser popup no bigger than 400px by 580px. Use this display type to maintain context for the user without needing to perform a full-page redirect.
所以,总结一下:根据文档,上面的实现应该没问题。还有其他人有此警告或解决方案吗?
最佳答案
JS-SDK 文档说浏览器弹出窗口应该“不大于 400 像素 x 580 像素”。他们没有指定的是他们的意思是 400px 高 x 580px 宽。
我在 275 高 x 875 宽的弹出式身份验证对话框中看到开发人员警告。我在 400 高 x 580 宽的弹出窗口中没有看到警告。
您的图像表明您的弹出窗口高 630 x 宽 446。任何阅读规范都太大了。
关于javascript - Facebook 身份验证对话框 : Developer warning concerning the use of "display" type "popup",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16542490/