如何添加 facebook“安装应用程序按钮”在粉丝页面选项卡上(基于工作示例)
一段时间以来,我试图弄清楚这些人如何能够在他们的粉丝页面选项卡上添加“在线签名”按钮,即“安装应用程序”按钮:
http://www.facebook.com/GuinnessIreland?v=app_165491161181
我在网上阅读过,但找不到任何可靠的解决方案。 FBML 和 FBJS 文档没有给我留下任何东西。
所以,如果有人可以帮助我的话。
注意:要对发送的 Ajax 请求进行多次测试,请勿接受应用程序安装。此后它的行为有所不同。
For some time now I try to figure out how these guys were able to add "Sign online here" button which is "install App" button on their fan-page tab:
http://www.facebook.com/GuinnessIreland?v=app_165491161181
I've read around the web and couldn't come up with any solid solution. The FBML and FBJS documentation left me with nothing.
So please, if anyone can help me with this.
NOTE: To make multiple tests on the Ajax request that are sent, do not accept the App install. It behaves differently after that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在了解它时也遇到了一些问题。维基百科或任何地方都没有关于这种行为的信息。在尝试了一些可能的解决方案后,我得到了它,最简单的一个是让用户与粉丝页面选项卡中嵌入的内容进行交互,例如单击某些内容等。然后您需要使用 requirelogin 参数发布 ajax 请求弹出来。简单的例子是:
以及它的触发器:
然后,如果已知用户正在使用您的应用程序(粉丝页面选项卡),您可以通过调用提示他获得其他权限,例如发布流或电子邮件通信:
希望这可以解决问题。
I had some problems with finding out about it as well. There is no info about this kind of behavior in wiki or anywhere. I got it working after trying some possible solutions and the simplest one is to make user interact with content embedded in fan page tab such as click on something etc. Then you need to post an ajax request with requirelogin parameter to pop up to come out. The simple example would be:
And the trigger for it:
Then if user is known to be using your application (fan page tab) you can prompt him for additional permission like publish stream or email communication by calling:
Hope this solves the problem.