粉丝页面上的“赞”按钮。他们是怎么做到的?
保时捷是如何在粉丝页面添加 Facebook 点赞按钮的?
他们还更改了颜色 http://www.facebook.com/porsche?v=app_172346812791398
How did Porche add Facebook like button to their fan page?
They also changed the colour http://www.facebook.com/porsche?v=app_172346812791398
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
哇,这真的很令人困惑,而且非常鬼祟。看起来他们使用 iframe 创建了一个应用程序,这将允许他们在其中创建一个 fb:like 按钮。然后他们将选项卡应用程序指向仅呈现一些 FBML 的 iframe 应用程序:
http://apps。 facebook.com/porscheevent/tab.php
因此,当您喜欢它时,在幕后,喜欢就会被注册。您会注意到,在刷新页面之前,顶部的实际按钮不会更改。
选项卡应用程序本身似乎添加了一些 CSS,然后隐藏 Like 按钮内容并将其替换为自己的内容:
在 iframe 应用程序中,他们使用 fb:comments 插件(上面有一个 Like 按钮)并将 returnurl 设置为他们的脸书页面。他们隐藏所有评论内容并禁用评论。如果你检查该样式节点并将其删除,看看会显示什么;)
所以基本上他们是在绕过 Facebook 不允许fb:就像在选项卡应用程序中一样,在 iframe 中使用 fbml,然后在渲染后在其上添加一些自定义样式。可能是反对 Facebook 的服务条款,但我确信他们都在从中摆脱保时捷;)
Wow, that's really confusing, and very sneaky. Looks like they created an application using an iframe, which would allow them to create a fb:like button in it. Then they pointed the tab application to that iframe app which just renders some FBML:
http://apps.facebook.com/porscheevent/tab.php
So when you like it, behind the scenes, the like is registered. You'll note that the actual button up top doesn't change until you refresh the page.
The tab application itself seems to add some CSS to then hide the Like button content and replace it with their own stuff:
In the iframe app they are using a fb:comments plugin (which has a Like button on it) and setting the returnurl to their facebook page. They hide all the commenting stuff and disable comments. If you inspect that style node and deleted it, look what shows up ;)
So basically they are circumventing Facebook not allowing fb:like in tab applications by using fbml in an iframe and then throwing some custom styles on top of that after it's rendered. Probably against Facebook's TOS, but I'm sure they are all getting Porsches out of it ;)
您可以构建一个应用程序并在其上显示您想要的内容,就像在 fbiframe 中一样,然后您可以在其上使用任何语言(例如 php)并执行一些动态操作。
You can build an aplication and show what ever you whant on it , like in an fbiframe, then you can use any language on it like php and do some dinamic stuff too.