Facebook 页面的 Facebook Like 按钮弹出网关
我想知道他们如何在 facebook 上创建带有“点赞”按钮作为进入和浏览页面的网关的页面...
这是一个示例... http://www.facebook.com/Diesel?sk=app_168523776552050
我知道如何在 iframe 中创建页面并放入 Facebook,但我不知道他们如何显示此弹出窗口以及如何向非粉丝访问者显示它。
请用你的想法和作品启发我......
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是一个简单的“粉丝门”,在无粉丝版本上,他们通过页面的 url 显示正常的点赞按钮。
这里描述了自己构建扇形门的简单方法:http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php
喜欢按钮:
This is a simple "Fan Gate", and on the none-fan version they show the normal like button via the url of the page.
A simple way to build a fan gate yourself is described here: http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php
The like button:
试试这个:
'签名请求'会告诉你用户是否是粉丝
写一些代码: if (user is fan) { show为粉丝提供的内容}
else { 为访问者显示内容 }
如果没有“签名的请求”,什么都不会发生。适用于 PHP 和 JS。
try this:
'signed request' will tell you whether the user is fan or not
write some code: if (user is fan) { show content for fans }
else { show content for visitors }
Nothing happens without the 'signed request'. Works in PHP and JS.
解析来自 Facebook 的“signed_request”参数。请参阅http://developers.facebook.com/docs/howtos/login/signed -request/
每个签名的请求都包含一个“page”键和一个“liked”子键,其值为布尔值,表示该页面是否已被喜欢。
根据该布尔值显示横幅。
请注意,只有页面选项卡视图上有类似按钮。 Canvas 应用程序周围没有“赞”按钮。
Parse the 'signed_request' parameter from Facebook. See http://developers.facebook.com/docs/howtos/login/signed-request/
Each signed request contains a 'page' key with a 'liked' subkey whose value is a bool of whether the page has been liked.
Display the banner depending on the value of that bool.
Note that only the Page Tab view has a like button on it. The Canvas App does not have a like button surrounding it.