Redirect User to my Website on a Facebook Canvas P

2019-05-25 20:18发布

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条回答
放荡不羁爱自由
2楼-- · 2019-05-25 20:44

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>
查看更多
登录 后发表回答