views:

289

answers:

1

Hi,

so i'm creating a login_url using php framework and getLoginUrl().

if my facebook app is setted as an FBML page, something like this works fine

echo '<fb:redirect url="'.$login_url.'" />';

but i need my facebook application configured as an IFRAME page, so it will not be rendered as FBML.

whats the best way to redirect my user to the login page?

using header(); in php will not work, because header is already sent. also

echo '<script type="text/javascript"> document.setLocation("'.$login_url.'"); </script>';

has no effect.

any ideas?

A: 

at the moment

echo '<script type="text/javascript"> top.location.href = "'.$login_url.'"; </script>';

is working. but i think its not a very clean solution. i'll accept another answer if somebody has a better way.

choise