Redirect User to my Website on a Facebook Canvas Page

删除回忆录丶 提交于 2019-12-08 01:24:29

问题


I have a small problem. I want to redirect a user to my website when he visits my facebook canvas page. As in friend.ly. They redirect user to their website rather than displaying the content in the Canvas page. The problem is that when i am using the PHP header function, it is showing the website in the iframe. I would like to redirect the entire page in mine.


回答1:


You have to use javascript to reach outside the iframe (commonly referred to as frame busting.)

<script>
window.top.location = 'http://www.yoursite.com/';
</script>


来源:https://stackoverflow.com/questions/5997466/redirect-user-to-my-website-on-a-facebook-canvas-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!