在Facebook画布页面上将用户重定向到我的网站 [英] Redirect User to my Website on a Facebook Canvas Page

查看:150
本文介绍了在Facebook画布页面上将用户重定向到我的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小问题。
当我访问我的Facebook画布页面时,我想将用户重定向到我的网站。
和朋友一样。他们将用户重定向到他们的网站,而不是在画布页面中显示内容。
问题是当我使用PHP标头函数时,它会在iframe中显示该网站。我想重定向我的整个页面。

解决方案

你必须使用javascript到达iframe外面(通常称为作为框架破坏。)

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


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>

这篇关于在Facebook画布页面上将用户重定向到我的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆