mini_fb 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mini_fb.rb +10 -4
- metadata +1 -1
data/lib/mini_fb.rb
CHANGED
@@ -197,10 +197,16 @@ module MiniFB
|
|
197
197
|
return false
|
198
198
|
end
|
199
199
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
200
|
+
# Returns the login/add app url for your application.
|
201
|
+
#
|
202
|
+
# options:
|
203
|
+
# - :next => a relative next page to go to. relative to your facebook connect url or if :canvas is true, then relative to facebook app url
|
204
|
+
# - :canvas => true/false - to say whether this is a canvas app or not
|
205
|
+
def self.login_url(api_key, options={})
|
206
|
+
login_url = "http://api.facebook.com/login.php?api_key=#{api_key}"
|
207
|
+
login_url << "&next=#{options[:next]}" if options[:next]
|
208
|
+
login_url << "&canvas" if options[:canvas]
|
209
|
+
login_url
|
204
210
|
end
|
205
211
|
|
206
212
|
# This function expects arguments as a hash, so
|