I am using FB.ui to display Facebook dialog. However, it is found sometimes the dialogs are displayed as a new popup window of the browser instead of as a lightbox iframe on the current page.

Why? What should I do to make sure the dialog will be displayed as lightbox iframe?




Appreciate if you can like this page if you find it useful! - Click "Like"

When calling FB.ui to display the dialogs, if the Facebook session is not built, Javascript SDK will open a new browser window for displaying the dialog (and before that, the session will be built).

To ensure a lightbox iframe will be used (as long as that is possible), you should first check and build the session. This can be done by, say, calling the FB.getLoginStatus when the page of your application is loaded. For details, please refer to Facebook documentation here.




Find my FAQ on Facebook Development useful? Download the PDF for all the FAQs HERE!