发送 Facebook 通知
我有一个用 Rails 和 facebooker 插件编写的小型 facebook iframe 应用程序。我可以循环浏览用户朋友,看看他们是否也有这个应用程序。为此,我使用 fql 查询和我自己的 html(无 fbml)。现在我想在每个没有此应用程序的朋友旁边创建一个按钮,用于发送邀请消息。没有这个 FBML/JS 巫毒可以做到这一点吗?我查看了 RESTful api,但我唯一能找到的是 这个已弃用的方法< /a> :(
有人能给我提供一个关于如何执行此操作的代码示例吗?
我真的不想使用这个 FBML 东西,因为它不符合应用程序的 ui 概念,但如果这是唯一的方法,请解释如何做到这一点(我尝试过的每个 fbml 标签都是不可见的:()
非常感谢。
I have a little facebook iframe application written with rails and the facebooker plugin. I can loop through the users friends and see whether they also have this application. To do this I use a fql query, and my own html (no fbml). Now i want to create a button right beside every friend who doesn't have this app, that sends an invite massage. Is it possible to do this without this FBML/JS voodoo? I looked through the RESTful api but the only thing i could found was this deprecated method :(
Can someone provide me an code example on how to do this?
I really don't want to use this FBML stuff because it doesn't fit into the ui concept of the app, but if that the only way, please explain how to do this (every fbml tag I've tried is just invisible :( )
Thanks a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目前,对于邀请,您只能使用 fb:request-form。在 fb:request-form 中,您需要以下标签,
如下所示:
这将显示带有邀请按钮的朋友选择器,用户需要选择朋友并单击邀请。但对你来说,最好使用 fb:request-form-submit 而不是 fb:multi-friend-selector 和 uid="target friend user id" ,如下所示:
这个仅显示一个按钮来邀请指定的人。然而,Facebook 表示将弃用 fb:request-form-submit,但它仍然有效。
为了显示 FBML,您需要将 iframe 应用程序制作为 XFBML,为此您需要包含 Facebook Javascript 库。然后将您想要的任何 FBML 放入其中。
Currently for invite you can only use fb:request-form. inside fb:request-form you need following tag
like this:
This will display friend selector with invite button and user need to select friends and click on invite. but for you it better to use fb:request-form-submit instead of fb:multi-friend-selector with uid="target frien user id" like this:
this one shows just one button to invite specified person. However facebook says going to deprecate fb:request-form-submit but it still works.
For showing FBML you need to make your iframe application XFBML and for that you need to include Facebook Javascript libraries. then put any FBML you want inside .
不幸的是,您对 iframe 应用程序的唯一选择是使用 fb:serverfbml 方法。其中,您可以使用 fb:request-form。
请参阅:http://wiki.developers.facebook.com/index.php/ Fb:serverFbml
这绝对不是我希望实现的方式,但它确实有效。
Unfortunately, your only option with an iframe app is to use the fb:serverfbml method. Within that, you are able to use the fb:request-form.
See: http://wiki.developers.facebook.com/index.php/Fb:serverFbml
Its definitely not the way I was hoping to implement one, but it works.