Skip to content

Instantly share code, notes, and snippets.

@bryfox
Forked from mjfreshyfresh/fb-comments.rb
Created December 3, 2009 23:05
Show Gist options
  • Save bryfox/248650 to your computer and use it in GitHub Desktop.
Save bryfox/248650 to your computer and use it in GitHub Desktop.
with new link_to_app
# app_helper
def callback_attribute
if request.env['PATH_INFO']
" callbackurl='#{link_to_app(request.env['PATH_INFO'])}?_method=GET' "
end
end
# in the view
<fb:comments xid="m_story_<%= @first.id %>_comments" canpost="true" candelete="false" showform="true" numposts="5" publish_feed="false" simple="true" reverse="true" returnurl="<%= link_to_app "item/#{@first.id}" %>" <%= callback_attribute %>>
<fb:title> <%= @first.couple_name %></fb:title>
</fb:comments>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment