Class: Facebooker::FacebookAdapter
Instance Method Summary
collapse
Methods inherited from AdapterBase
#api_server_base_url, default_adapter, #facebook_path_prefix, #facebook_path_prefix=, #facebooker_config, facebooker_config, #initialize, load_adapter
Instance Method Details
#api_key ⇒ Object
22
23
24
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 22
def api_key
ENV['FACEBOOK_API_KEY'] || super
end
|
#api_rest_path ⇒ Object
18
19
20
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 18
def api_rest_path
"/restserver.php"
end
|
#api_server_base ⇒ Object
10
11
12
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 10
def api_server_base
"api.facebook.com"
end
|
#canvas_server_base ⇒ Object
6
7
8
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 6
def canvas_server_base
"apps.facebook.com"
end
|
#install_url_base ⇒ Object
40
41
42
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 40
def install_url_base
"http://#{www_server_base_url}/install.php?api_key=#{api_key}&v=1.0"
end
|
#is_for?(application_context) ⇒ Boolean
30
31
32
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 30
def is_for?(application_context)
application_context == :facebook
end
|
#login_url_base ⇒ Object
36
37
38
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 36
def login_url_base
"http://#{www_server_base_url}/login.php?api_key=#{api_key}&v=1.0"
end
|
#secret_key ⇒ Object
26
27
28
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 26
def secret_key
ENV['FACEBOOK_SECRET_KEY'] || super
end
|
#www_server_base_url ⇒ Object
14
15
16
|
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 14
def www_server_base_url
"www.facebook.com"
end
|