0

I am developing a facebook app using rails 3 and facebooker2 i cannot find any example on how to use fb_server_fbml helper method.
what is "proc" in its paramter. Can anyone provide me with sample code?

Thanks

gparis
  • 1,247
  • 12
  • 32
Zahid
  • 1

1 Answers1

0

The &proc parameter is used as a content block that is inserted between the <fb:serverFbml> tags. You can learn more about block helpers and differences between Rails 2.3 and Rails 3 here: Block Helpers in Rails 3

So, try something like this:

<% fb_server_fbml do %>
  <%#Insert here your content %>
<% end %>

If you want to use the request form, try the following:

<% fb_server_fbml do %>
  <% fb_request_form("Your app name","http://www.example.com/callback","Try this out!") do %>
    <%= fb_multi_friend_selector("Invite your friends:", {:rows => 3}) %>
  <% end %>
<% end %>
gparis
  • 1,247
  • 12
  • 32
  • Thanks gparis it did work but not as it should instead of rendering the html it dumped it on the page any idea why is this happening I have other helper function working like fb_profile_pic. fb_connect_async_js also does the same i.e it dumps all the html on page instead of rending it. I fixed the fb_connect_async_js problem by copying the html dumped on page into my code. Is this something to do with html safe string? – Zahid Mar 30 '11 at 05:55