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.
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