Sha256: 66c07bd0ddf9f2b6bc9cc2600e6900fd15a760a37ebe3b929880e8807fceaca0
Contents?: true
Size: 867 Bytes
Versions: 5
Compression:
Stored size: 867 Bytes
Contents
# encoding: utf-8 module DeviseFacebookOpenGraph module Rails module ViewHelpers # # Inserts facebook HTML and javascript tag for initializing # JavaScript SDK. See http://developers.facebook.com/docs/authentication/: Single Sign-on. # # Some options to this helper-method might be added in the future :-) # def facebook_init_javascript_sdk buffer = content_tag :div, '', :id => 'fb-root' buffer << javascript_include_tag(DeviseFacebookOpenGraph::Facebook::Config.sdk_java_script_source) buffer << javascript_tag(<<-JAVASCRIPT) FB.init({ appId: '#{DeviseFacebookOpenGraph::Facebook::Config.application_id}', status: true, cookie: true, xfbml: true }); JAVASCRIPT buffer.html_safe end end end end
Version data entries
5 entries across 5 versions & 1 rubygems