Class: Facebooker::FacebookAdapter

Inherits:
AdapterBase show all
Defined in:
lib/facebooker/adapters/facebook_adapter.rb

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

Constructor Details

This class inherits a constructor from Facebooker::AdapterBase

Instance Method Details

#api_keyObject



26
27
28
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 26

def api_key
  ENV['FACEBOOK_API_KEY'] || super      
end

#api_rest_pathObject



22
23
24
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 22

def api_rest_path
  "/restserver.php"
end

#api_server_baseObject



10
11
12
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 10

def api_server_base
   "api.facebook.com"
end

#canvas_server_baseObject



6
7
8
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 6

def canvas_server_base
  "apps.facebook.com"
end

#connect_permission_url_baseObject



48
49
50
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 48

def connect_permission_url_base
  "http://#{www_server_base_url}/connect/prompt_permissions.php?api_key=#{api_key}&v=1.0"      
end

#install_url_baseObject



44
45
46
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 44

def install_url_base
  "http://#{www_server_base_url}/install.php?api_key=#{api_key}&v=1.0"
end

#is_for?(application_context) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 34

def is_for?(application_context)
  application_context == :facebook
end

#login_url_baseObject



40
41
42
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 40

def 
  "http://#{www_server_base_url}/login.php?api_key=#{api_key}&v=1.0"
end

#permission_url_baseObject



52
53
54
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 52

def permission_url_base
  "http://#{www_server_base_url}/authorize.php?api_key=#{api_key}&v=1.0"
end

#secret_keyObject



30
31
32
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 30

def secret_key
  ENV['FACEBOOK_SECRET_KEY'] || super
end

#video_server_baseObject



14
15
16
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 14

def video_server_base
  "api-video.facebook.com"
end

#www_server_base_urlObject



18
19
20
# File 'lib/facebooker/adapters/facebook_adapter.rb', line 18

def www_server_base_url
  "www.facebook.com"
end