最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Facebook Auth Dialog: Developer warning concerning the use of "display" type "popup&

programmeradmin2浏览0评论

starting today we receive developer warnings in the auth dialog with the following message:

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.

We have the following situation:

  • with javascript we open a new popup
  • the src of the popup is set with Facebook's PHP-SDK method getLoginUrl
  • popup itself has a size of 400px by 580px

The PHP-SDK itself references the proper use of "display=popup" within it's own code:

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.

The JS-SDK documentation says, that the maximum-size of the opened popup should be 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.

So, to sum up: According to the docs, the implementation above should be ok. Is anyone else having this warning or a solution for this?

starting today we receive developer warnings in the auth dialog with the following message:

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.

We have the following situation:

  • with javascript we open a new popup
  • the src of the popup is set with Facebook's PHP-SDK method getLoginUrl
  • popup itself has a size of 400px by 580px

The PHP-SDK itself references the proper use of "display=popup" within it's own code:

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.

The JS-SDK documentation says, that the maximum-size of the opened popup should be 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.

So, to sum up: According to the docs, the implementation above should be ok. Is anyone else having this warning or a solution for this?

Share Improve this question asked May 14, 2013 at 11:54 Johannes N.Johannes N. 2,3743 gold badges28 silver badges45 bronze badges 3
  • 1 “popup itself has a size of 400px by 580px” – your screenshot suggests otherwise, it’s 446x630 pixels in size … – C3roe Commented May 16, 2013 at 12:10
  • I would try 399x579. Consider that it is a suggestion for the developer, the user won't see the warning. Also, don't rely 100% on documentation, it could be wrong :-/ – Marcelo Pascual Commented May 22, 2013 at 18:04
  • There's also another caveat to this. Quoting Jeff there: you'll see this alert only if you log in using the Facebook credentials of the person who registered this Facebook application. – cregox Commented Oct 7, 2014 at 11:44
Add a comment  | 

2 Answers 2

Reset to default 8

The JS-SDK documentation says the browser popup should be "no bigger than 400px by 580px". What they don't specify is that they mean 400px tall by 580px wide.

I see the developer warning in my popup auth dialogs that are 275 tall by 875 wide. I do not see the warning in my popups that are 400 tall by 580 wide.

Your image suggests your popup is 630 high by 446 wide. Too big by any reading of the specification.

Maybe you should switch to FB JS SDK and FB.login() method? It always provides the best user experience.

https://developers.facebook.com/docs/reference/javascript/FB.login/

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论