开发者

redirect to tab page from canvace page in facebook apps using php

i have created facebook application in which i need to redirect user from tab page to canvace page and also redirect back to tab page from canvace page... using php header('location:'); this command is working but it dose not directly redirect to tab page... temporary i will redirect to facebook logo page with redirection link "Go facebook." on clicking t开发者_如何学JAVAhat like we can redirect to tab page... Is there any solution to direct redirection to tab page from canvance page...


Yes there's:

echo("<script> top.location.href='" . $page_tab_url . "'</script>");

This way is mentioned in the Facebook documentation in a couple of places.


To get it to work in Internet Explorer I had to use following code:

<!DOCTYPE html>
<html>
    <head>
       <script>
                parent.location.href = '<?php echo url;?>';
       </script>

    </head>
</html>


echo("<script> top.location.href='" . $page_tab_url . "'</script>");

is working well in IE, but NOT in firefox and Chrome !!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜