Facebook - 粉丝门/重定向问题
我在 Facebook 上建立了一个商业页面。 当用户第一次到达时,他们会看到一个使用粉丝门控的自定义欢迎应用程序 iframe 应用程序。 (1) 如果用户点击“LIKE”,那么我们会将其转发到墙上。 (2) 如果用户随后单击欢迎应用程序链接,他们应该能够正常查看内容。目前在欢迎应用程序上,我有一些将用户转发到 Wall 的 javascript:
<script type="text/javascript">
if (top != self) top.window.location = 'http://www.facebook.com/abc?sk=wall';
</script>
所以问题是,如果用户喜欢,我只需要将用户转发到 Wall,但之后不会继续将他们转发到 Wall,而是让他们查看实际内容。
在 Facebook 上如何做到这一点?设置cookie?
I have set up a business page on Facebook.
When user first arrives they see a custom welcome app iframe app that uses fan gating.
(1) If user clicks LIKE then we forward them to the wall.
(2) If user subsequently clicks on welcome app link they should be able to view the content as normal. Currently on the welcome app I have some javascript that forwards the user to wall:
<script type="text/javascript">
if (top != self) top.window.location = 'http://www.facebook.com/abc?sk=wall';
</script>
So the issue is I only need to forward the user to Wall if they've LIKED though not continue forwarding them to the WALL afterwards, though rather let them view the actual content.
How might this be done on Facebook? set a cookie?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从解析的签名请求(到选项卡 iFrame)中,您可以获取查看用户是否喜欢您的页面 - 内容将类似于以下内容(PHP print_r 的输出):
有关详细信息,请参阅:
http://developers.facebook.com/docs/authentication/signed_request/
如果用户是您页面的粉丝,变量
liked
设置为 1。如果不是,您可以输出您的重定向:From a parsed signed request (to an tab iFrame) you can get if the viewing user likes your page - the contents would be similar to the following (output of PHP print_r):
For more information see:
http://developers.facebook.com/docs/authentication/signed_request/
If the user is a fan of your page the variable
liked
with be set to 1. If not you can output your redirect: