mogli 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,10 +9,9 @@ module Mogli
9
9
  @callback_url = callback_url
10
10
  end
11
11
 
12
- def authorize_url(*scopes)
13
- scopes = scopes.flatten
14
- scope_part = "&scope=#{scopes.join(",")}" unless scopes.blank?
15
- "https://graph.facebook.com/oauth/authorize?client_id=#{client_id}&redirect_uri=#{CGI.escape(callback_url)}#{scope_part}"
12
+ def authorize_url(options = {})
13
+ options_part = "&" + options.map {|k,v| "#{k}=#{v.kind_of?(Array) ? v.join(',') : v}" }.join('&') unless options.empty?
14
+ "https://graph.facebook.com/oauth/authorize?client_id=#{client_id}&redirect_uri=#{CGI.escape(callback_url)}#{options_part}"
16
15
  end
17
16
 
18
17
  def access_token_url(code)
@@ -20,4 +19,4 @@ module Mogli
20
19
  end
21
20
 
22
21
  end
23
- end
22
+ end
@@ -13,7 +13,7 @@ module Mogli
13
13
  class UnrecognizeableClassError < Exception; end
14
14
 
15
15
  def api_path(path)
16
- "http://graph.facebook.com/#{path}"
16
+ "https://graph.facebook.com/#{path}"
17
17
  end
18
18
 
19
19
  def initialize(access_token = nil,expiration=nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mogli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Mangino
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-05-11 00:00:00 -04:00
12
+ date: 2010-05-12 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency