在 ruby​​ sinatra 应用程序中使用 FBML

发布于 2024-09-05 05:57:06 字数 937 浏览 2 评论 0原文

我正在使用 sinatra 框架在 ruby​​ 中构建一个应用程序,但在渲染一些 fbml 元素时遇到问题。

我目前正在尝试渲染一个 fb:multi-friend-selector ,以便用户可以选择他们想要邀请的朋友。但是,当我在代码中编写以下内容时:

<fb:fbml> 
    <fb:request-form action="/inviteFriends" method="POST" invite="true" type="MY APP" content="Invite Friends" > 
         <fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use YOUR APP NAME."> 
    </fb:request-form> 
</fb:fbml>

上面的文本不会呈现任何内容。我已经在我的 html 标记中包含了 taglib 的常规 facebook xsd,并使用以下代码在页面上测试了 fbml:

<fb:name useyou="false" uid="USER_ID" linked="false"/>

此代码工作正常并显示用户名。

我在 http://wiki.developers 上尝试过一个简单的例子。 facebook.com/index.php/Fb:random 但浏览器中再次没有呈现任何内容。

我需要包含一些特殊的 javascript 或其他东西吗?

我非常感谢对此的帮助。

提前致谢 -齿轮。

I'm building an application in ruby using the sinatra framework and am having trouble with rendering some fbml elements.

I'm currently trying to render an fb:multi-friend-selector so the user can select which friends they want to invite. However, when I write the following in my code:

<fb:fbml> 
    <fb:request-form action="/inviteFriends" method="POST" invite="true" type="MY APP" content="Invite Friends" > 
         <fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use YOUR APP NAME."> 
    </fb:request-form> 
</fb:fbml>

Nothing renders with the text above. I've included the regular facebook xsds for the taglibs in my html tag and have tested fbml on the page using the following code:

<fb:name useyou="false" uid="USER_ID" linked="false"/>

This code works correctly and displays the user's name.

I've tried a simple example like that on http://wiki.developers.facebook.com/index.php/Fb:random but again nothing is rendered in the browser.

Do I need to include some special javascript or anything?

I would greatly appreciate some help with this.

Thanks in advance
-gearoid.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦纸 2024-09-12 05:57:07

我刚刚意识到你必须使用 server:fbml 标签才能使其工作。

Facebook 文档确实需要做一些工作:)

I've just realised that you have to use the server:fbml tags for this to work.

Facebook documentation could really use some work :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文