fb_graph_rails 0.0.2 → 0.0.3

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/README.md CHANGED
@@ -23,7 +23,8 @@ keys of your application and your facebook secret.
23
23
  development: &defaults
24
24
  client_id: your_client_id
25
25
  client_secret: your_client_secret
26
- scope: user_about_me,user_activities,user_birthday,user_education_history,user_events,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_relationships,user_relationship_details,user_religion_politics,user_status,user_videos,user_website,user_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,user_checkins,publish_stream,create_event,rsvp_event,sms,offline_access,publish_checkins,manage_pages,friends_about_me,friends_activities,friends_birthday,friends_education_history,friends_events,friends_groups,friends_hometown,friends_interests,friends_likes,friends_location,friends_notes,friends_online_presence,friends_photo_video_tags,friends_photos,friends_relationships,friends_relationship_details,friends_religion_politics,friends_status,friends_videos,friends_website,friends_work_history,manage_friendlists,friends_checkins,manage_notifications # ,user_address,user_mobile_phone
26
+ # scope: user_about_me,user_activities,user_birthday,user_education_history,user_events,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_relationships,user_relationship_details,user_religion_politics,user_status,user_videos,user_website,user_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,user_checkins,publish_stream,create_event,rsvp_event,sms,offline_access,publish_checkins,manage_pages,friends_about_me,friends_activities,friends_birthday,friends_education_history,friends_events,friends_groups,friends_hometown,friends_interests,friends_likes,friends_location,friends_notes,friends_online_presence,friends_photo_video_tags,friends_photos,friends_relationships,friends_relationship_details,friends_religion_politics,friends_status,friends_videos,friends_website,friends_work_history,manage_friendlists,friends_checkins,manage_notifications # ,user_address,user_mobile_phone
27
+ scope: [email, user_about_me]
27
28
  canvas_url: http://apps.facebook.com/your_app
28
29
  model: your_user_model
29
30
 
@@ -11,7 +11,6 @@ module FbGraphRails::FbActionControllerExtension
11
11
  module InstanceMethods
12
12
 
13
13
  def fb_auth_required
14
- p self.authenticated?
15
14
  unless self.authenticated?
16
15
  auth = self.class.fb_auth
17
16
  auth.from_signed_request(params[:signed_request]) unless params[:signed_request].blank?
@@ -19,7 +18,9 @@ module FbGraphRails::FbActionControllerExtension
19
18
  authenticate self.class.fb_model.identify(auth.user)
20
19
  return true
21
20
  else
22
- return redirect_to auth.authorize_uri(self.class.fb_canvas_url).html_safe
21
+ url = auth.authorize_uri(self.class.fb_canvas_url, :scope => self.class.fb_auth_scope).html_safe
22
+ return render :inline => "<script>top.location.href = '#{url}';</script>"
23
+
23
24
  end
24
25
  end
25
26
  end
@@ -25,6 +25,10 @@ module FbGraphRails
25
25
  def fb_canvas_url
26
26
  @_canvas_url ||= fb_config[:canvas_url]
27
27
  end
28
+
29
+ def fb_auth_scope
30
+ @_auth_scope ||= fb_config[:scope]
31
+ end
28
32
  end # module
29
33
 
30
34
 
@@ -1,3 +1,3 @@
1
1
  module FbGraphRails
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb_graph_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-12-29 00:00:00.000000000Z
13
+ date: 2012-01-09 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &2168519060 !ruby/object:Gem::Requirement
17
+ requirement: &2152013180 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2168519060
25
+ version_requirements: *2152013180
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: fb_graph
28
- requirement: &2168518500 !ruby/object:Gem::Requirement
28
+ requirement: &2152010880 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 2.2.4
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2168518500
36
+ version_requirements: *2152010880
37
37
  description: ''
38
38
  email:
39
39
  - fabian.otto@familienservice.de