facebooker-lite 1.0.67.1 → 1.0.67.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -69,6 +69,41 @@ module Facebooker
69
69
  end
70
70
  end
71
71
 
72
+ #
73
+ # Render an <fb:login-button> element
74
+ #
75
+ # ==== Examples
76
+ #
77
+ # <%= fb_login_button%>
78
+ # => <fb:login-button></fb:login-button>
79
+ #
80
+ # Specifying a javascript callback
81
+ #
82
+ # <%= fb_login_button 'update_something();'%>
83
+ # => <fb:login-button onlogin='update_something();'></fb:login-button>
84
+ #
85
+ # Adding options <em>See:</em> http://wiki.developers.facebook.com/index.php/Fb:login-button
86
+ #
87
+ # <%= fb_login_button 'update_something();', :size => :small, :background => :dark%>
88
+ # => <fb:login-button background='dark' onlogin='update_something();' size='small'></fb:login-button>
89
+ #
90
+ # :text option allows you to set the text value of the
91
+ # button. *A note!* This will only do what you expect it to do
92
+ # if you set :v => 2 as well.
93
+ #
94
+ # <%= fb_login_button 'update_somethign();',
95
+ # :text => 'Loginto Facebook', :v => 2 %>
96
+ # => <fb:login-button v='2' onlogin='update_something();'>Login to Facebook</fb:login-button>
97
+ def fb_login_button(*args)
98
+
99
+ callback = args.first
100
+ options = args[1] || {}
101
+ options.merge!(:onlogin=>callback) if callback
102
+
103
+ text = options.delete(:text)
104
+
105
+ content_tag("fb:login-button",text, options)
106
+ end
72
107
  end
73
108
  end
74
109
  end
@@ -3,7 +3,7 @@ module Facebooker #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
5
  TINY = 67
6
- BUILD = 1
6
+ BUILD = 2
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].join('.')
9
9
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 0
8
8
  - 67
9
- - 1
10
- version: 1.0.67.1
9
+ - 2
10
+ version: 1.0.67.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chad Fowler