Question:

In http://www.takwing.idv.hk/tech/fb_dev/faq/fbml/fbml_07.php, you have discussed how to redirect the user to do the login for a FBML canvas application. What is the equivalence for IFrame canvas app?

 

 

 

Answer:

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

For IFrame canvas app, you cannot use the "<fb:redirect>" tag.

To redirect the user to do the login, use the following code (which assume you are using PHP script):

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

 

 

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