pointcom-merb_facebooker 0.0.2 → 0.0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/merb_facebooker/controller.rb +24 -0
- data/templates/config/facebooker.yml +41 -0
- metadata +5 -4
@@ -191,6 +191,30 @@ module Facebooker
|
|
191
191
|
facebook_params['added']
|
192
192
|
end
|
193
193
|
|
194
|
+
def ensure_has_status_update(options = {})
|
195
|
+
has_extended_permission?("status_update") || application_needs_permission("status_update", options)
|
196
|
+
end
|
197
|
+
|
198
|
+
def ensure_has_photo_upload(options = {})
|
199
|
+
has_extended_permission?("photo_upload") || application_needs_permission("photo_upload", options)
|
200
|
+
end
|
201
|
+
|
202
|
+
def ensure_has_create_listing(options = {})
|
203
|
+
has_extended_permission?("create_listing") || application_needs_permission("create_listing", options)
|
204
|
+
end
|
205
|
+
|
206
|
+
def ensure_has_rsvp_event(options = {})
|
207
|
+
has_extended_permission?("rsvp_event") || application_needs_permission("rsvp_event", options)
|
208
|
+
end
|
209
|
+
|
210
|
+
def application_needs_permission(perm, options = {})
|
211
|
+
throw :halt, redirect(facebook_session.permission_url(perm, options))
|
212
|
+
end
|
213
|
+
|
214
|
+
def has_extended_permission?(perm)
|
215
|
+
params["fb_sig_ext_perms"] and params["fb_sig_ext_perms"].include?(perm)
|
216
|
+
end
|
217
|
+
|
194
218
|
def ensure_authenticated_to_facebook
|
195
219
|
set_facebook_session || create_new_facebook_session_and_redirect!
|
196
220
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# The api key, secret key, and canvas page name are required to get started
|
2
|
+
# Tunnel configuration is only needed if you are going to use the facebooker:tunnel Rake tasks
|
3
|
+
# Your callback url in Facebook should be set to http://public_host:public_port
|
4
|
+
# To develop for the new profile design, add the following key..
|
5
|
+
# api: new
|
6
|
+
# remove the key or set it to anything else to use the old facebook design.
|
7
|
+
# This should only be necessary until the final version of the new profile is released.
|
8
|
+
|
9
|
+
development:
|
10
|
+
api_key:
|
11
|
+
secret_key:
|
12
|
+
canvas_page_name:
|
13
|
+
callback_url:
|
14
|
+
pretty_errors: true
|
15
|
+
tunnel:
|
16
|
+
public_host_username:
|
17
|
+
public_host:
|
18
|
+
public_port: 4007
|
19
|
+
local_port: 3000
|
20
|
+
|
21
|
+
test:
|
22
|
+
api_key:
|
23
|
+
secret_key:
|
24
|
+
canvas_page_name:
|
25
|
+
callback_url:
|
26
|
+
tunnel:
|
27
|
+
public_host_username:
|
28
|
+
public_host:
|
29
|
+
public_port: 4007
|
30
|
+
local_port: 3000
|
31
|
+
|
32
|
+
production:
|
33
|
+
api_key:
|
34
|
+
secret_key:
|
35
|
+
canvas_page_name:
|
36
|
+
callback_url:
|
37
|
+
tunnel:
|
38
|
+
public_host_username:
|
39
|
+
public_host:
|
40
|
+
public_port: 4007
|
41
|
+
local_port: 3000
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pointcom-merb_facebooker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2
|
4
|
+
version: 0.0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Van Pelt
|
@@ -9,7 +9,7 @@ autorequire: merb_facebooker
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-01-11 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,13 +22,13 @@ dependencies:
|
|
22
22
|
version: 0.9.4
|
23
23
|
version:
|
24
24
|
- !ruby/object:Gem::Dependency
|
25
|
-
name: facebooker
|
25
|
+
name: mmangino-facebooker
|
26
26
|
version_requirement:
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
28
|
requirements:
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version:
|
31
|
+
version: 1.0.10
|
32
32
|
version:
|
33
33
|
description: Merb plugin that makes rfacebooker work with merb...
|
34
34
|
email: vanpelt@doloreslabs.com
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- lib/merb_facebooker.rb
|
52
52
|
- spec/merb_facebooker_spec.rb
|
53
53
|
- spec/spec_helper.rb
|
54
|
+
- templates/config/facebooker.yml
|
54
55
|
has_rdoc: true
|
55
56
|
homepage: http://merb-plugins.rubyforge.org/merb_facebooker/
|
56
57
|
post_install_message:
|