Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have same trouble. Second day looking for a solution. And just found one way: for closing active FB dialog you should perform followed code in parent window where FB JS is available and where FB.ui was called:</p> <pre><code>FB.Dialog.remove(FB.Dialog._active); </code></pre> <p>So, if you want your invite dialog auto closes and don't redirects to any other page, use these steps:</p> <p>1) Set target attr of and as "_self":</p> <blockquote> <p>target="_self"</p> </blockquote> <p>2) create some callback url/page on your site, for example <code>https://mysite/close_dialog.html</code></p> <p>3) Set action attr of as just created url: </p> <blockquote> <p>action="http://mysite/close_dialog.html"</p> </blockquote> <p>4) In your close_dialog.html put followed JS:</p> <pre><code> &lt;script type="text/javascript"&gt; if (document.location.protocol == 'https:') { document.location = 'http://mysite/close_dialog.html'; } else { top.window.FB.Dialog.remove(top.window.FB.Dialog._active); }; &lt;/script&gt; </code></pre> <p><strong>UPDATE:</strong></p> <p>5) There is one issue else in this way: FB iframe loaded by https, but if request-form 'action' attr uses 'http' - user will get browser warning. But if request-form 'action' has 'https' - iframe js cant access to parent loaded by 'http'. So, its the reason why you should use action by 'https'</p> <p>Hope this helps</p> <p>If you has better solution or you can improve this way - please let all know this, Thanks for any comments</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload