Skip to content

Instantly share code, notes, and snippets.

@timurvafin
Created June 26, 2009 16:35
Show Gist options
  • Save timurvafin/136589 to your computer and use it in GitHub Desktop.
Save timurvafin/136589 to your computer and use it in GitHub Desktop.
class FacebookPublisher < Facebooker::Rails::Publisher
include Kt::Rails::KontagentHelpers
def kt_notification(event_name, from_user, recipient_ids, link_url)
send_as :notification
recipients recipient_ids
from Facebooker::User.new(from_user.user_id)
campaign event_name
link_text = kt_get_msg_buttons(APP_CONFIG['events'][event_name], 0)
link_text = link_text.blank? ? 'Play' : link_text
fbml <<-FBML
{*KT_AB_MSG*}
#{link_to(link_text, link_url)}
FBML
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment