fb_graph 1.7.0.alpha2 → 1.7.0

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.
Files changed (4) hide show
  1. data/README.rdoc +11 -10
  2. data/VERSION +1 -1
  3. data/fb_graph.gemspec +3 -3
  4. metadata +8 -12
data/README.rdoc CHANGED
@@ -203,28 +203,29 @@ You can also see http://github.com/nov/fb_graph_sample for more details Rails3 s
203
203
  ==== JavaScript SDK
204
204
 
205
205
  fb_auth = FbGraph::Auth.new(YOUR_APP_ID, YOUR_APPLICATION_SECRET)
206
- fb_auth.client # => OAuth2::Client
206
+ fb_auth.client # => Rack::OAuth2::Client
207
207
 
208
208
  # get Facebook's auth cookie in advance using their JS SDK
209
209
  fb_auth.from_cookie(cookies)
210
- fb_auth.access_token # => OAuth2::AccessToken
210
+ fb_auth.access_token # => Rack::OAuth2::AccessToken
211
211
  fb_auth.user # => FbGraph::User (only basic attributes)
212
212
  fb_auth.user.fetch # => fetch more details
213
213
 
214
214
  ==== Normal OAuth2 Flow
215
215
 
216
+ # setup client
217
+ client = fb_auth.client
218
+ client.redirect_uri = "http://your.client.com/facebook/callback"
219
+
216
220
  # redirect user to facebook
217
- redirect_to fb_auth.client.web_server.authorize_url(
218
- :redirect_uri => "http://your.client.com/facebook/callback",
219
- :scope => "email,read_stream,offline_access"
221
+ redirect_to client.authorize_uri(
222
+ :scope => [:email, :read_stream, :offline_access]
220
223
  )
221
224
 
222
225
  # in callback
223
- fb_auth.client.web_server.get_access_token(
224
- params[:code],
225
- :redirect_uri => callback_facebook_url
226
- ) # => OAuth2::AccessToken
227
- FbGraph::User.me(access_token).fetch # => fetch user
226
+ client.authorization_code = params[:code]
227
+ access_token = client.access_token! # => Rack::OAuth2::AccessToken
228
+ FbGraph::User.me(access_token).fetch # => FbGraph::User
228
229
 
229
230
  === Analytics
230
231
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.0.alpha2
1
+ 1.7.0
data/fb_graph.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fb_graph}
8
- s.version = "1.7.0.alpha2"
8
+ s.version = "1.7.0"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["nov matake"]
12
- s.date = %q{2011-04-22}
12
+ s.date = %q{2011-04-23}
13
13
  s.description = %q{A full-stack Facebook Graph API wrapper in Ruby.}
14
14
  s.email = %q{nov@matake.jp}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb_graph
3
3
  version: !ruby/object:Gem::Version
4
- hash: -3702664440
5
- prerelease: 6
4
+ hash: 11
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
9
  - 0
10
- - alpha
11
- - 2
12
- version: 1.7.0.alpha2
10
+ version: 1.7.0
13
11
  platform: ruby
14
12
  authors:
15
13
  - nov matake
@@ -17,7 +15,7 @@ autorequire:
17
15
  bindir: bin
18
16
  cert_chain: []
19
17
 
20
- date: 2011-04-22 00:00:00 +09:00
18
+ date: 2011-04-23 00:00:00 +09:00
21
19
  default_executable:
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
@@ -412,14 +410,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
412
410
  required_rubygems_version: !ruby/object:Gem::Requirement
413
411
  none: false
414
412
  requirements:
415
- - - ">"
413
+ - - ">="
416
414
  - !ruby/object:Gem::Version
417
- hash: 25
415
+ hash: 3
418
416
  segments:
419
- - 1
420
- - 3
421
- - 1
422
- version: 1.3.1
417
+ - 0
418
+ version: "0"
423
419
  requirements: []
424
420
 
425
421
  rubyforge_project: