function fboauth_close_popup_window in Facebook OAuth (FBOAuth) 7.2
Returns a HTML string to close the popup modal window and redirect the opener window to the relevant URL.
Parameters
$url:
Return value
string
1 call to fboauth_close_popup_window()
- fboauth_action_page in includes/
fboauth.fboauth.inc - Menu callback; The main page for processing OAuth login transactions.
File
- includes/
fboauth.fboauth.inc, line 82 - Provides functions used during Facebook login processes.
Code
function fboauth_close_popup_window($url) {
return "\n <html>\n <head>\n <script type=\"text/javascript\">\n if (window.opener) {\n window.opener.location = '{$url}';\n setTimeout(function(){ window.close(); }, 500);\n }\n else {\n window.location = '{$url}';\n }\n </script>\n </head>\n </html>";
}