Module: OmniAuth::Strategies::Renren::Helper
- Defined in:
- lib/omniauth_china/strategies/renren/helper.rb
Instance Method Summary collapse
- #omniauth_renren_connect_button ⇒ Object
- #omniauth_renren_friends(options = {}) ⇒ Object
- #omniauth_renren_invite(options = {}) ⇒ Object
- #omniauth_renren_javascript ⇒ Object
- #omniauth_renren_like_button(options = {}) ⇒ Object
- #omniauth_renren_live_widget(options = {}) ⇒ Object
- #omniauth_simple_renren_connect_button(options = {}) ⇒ Object
Instance Method Details
#omniauth_renren_connect_button ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/omniauth_china/strategies/renren/helper.rb', line 5 def callback_path = "#{OmniAuth.config.path_prefix}/renren/callback" @renren_connect_form_id = 'omniauth_renren_connect_form' if defined?(::ActionView::Helpers::FormTagHelper) form_tag(callback_path, :id => @renren_connect_form_id) do .html_safe end else <<-HTML <form accept-charset="UTF-8" action="#{callback_path}" id="#{@renren_connect_form_id}" method="post"> #{} </form> HTML end end |
#omniauth_renren_friends(options = {}) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/omniauth_china/strategies/renren/helper.rb', line 38 def omniauth_renren_friends( = {}) params = { :max_rows => "2", :face_space => "5", :width => "217" }.merge() renren_friends(params).html_safe end |
#omniauth_renren_invite(options = {}) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/omniauth_china/strategies/renren/helper.rb', line 64 def omniauth_renren_invite( = {}) params = { :content => "Join us", :url1 => "http://www.renren.com", :label1 => "Go", :url2 => "http://apps.renren.com/yourapp", :label2 => "Accept", :action => "/yourapp/youraction", :friend_text => "Invite your friends", :max => "5", :mode => "all", :width => "735", :height => "450" }.merge() renren_invite(params).html_safe end |
#omniauth_renren_javascript ⇒ Object
81 82 83 |
# File 'lib/omniauth_china/strategies/renren/helper.rb', line 81 def omniauth_renren_javascript renren_javascript.html_safe end |
#omniauth_renren_like_button(options = {}) ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/omniauth_china/strategies/renren/helper.rb', line 55 def ( = {}) params = { :width => "200px", :height => "70px", :url => root_url }.merge() (params).html_safe end |
#omniauth_renren_live_widget(options = {}) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/omniauth_china/strategies/renren/helper.rb', line 47 def ( = {}) params = { :width => "370px", :height => "390px" }.merge() (params).html_safe end |
#omniauth_simple_renren_connect_button(options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/omniauth_china/strategies/renren/helper.rb', line 24 def ( = {}) params = { :src => "http://pics.wanlibo.com/images_cn/registration/renren.png", :title => "renren connect", :alt => "renren connect" }.merge() p = "" params.each do |k, v| p += k.to_s + "='" + v + "' " end (p).html_safe end |