Class: Challah::Facebook::Interfaces::Base
- Inherits:
-
Object
- Object
- Challah::Facebook::Interfaces::Base
- Defined in:
- lib/challah/facebook/interfaces/base.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#app_secret ⇒ Object
readonly
Returns the value of attribute app_secret.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
Class Method Summary collapse
-
.get_access_token_for_oauth_code(code, callback_uri) ⇒ Object
These methods should be implemented by the specific interface that inherits from Base.
- .get_authorization_url(callback_uri, permissions = nil) ⇒ Object
- .get_extended_token(access_token) ⇒ Object
- .get_facebook_uid_from_access_token(access_token) ⇒ Object
- .get_user_info_from_access_token(access_token) ⇒ Object
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 |
# File 'lib/challah/facebook/interfaces/base.rb', line 7 def initialize( = {}) @app_id = .fetch(:app_id) @app_secret = .fetch(:app_secret) = .fetch(:permissions) end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
5 6 7 |
# File 'lib/challah/facebook/interfaces/base.rb', line 5 def app_id @app_id end |
#app_secret ⇒ Object (readonly)
Returns the value of attribute app_secret.
5 6 7 |
# File 'lib/challah/facebook/interfaces/base.rb', line 5 def app_secret @app_secret end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
5 6 7 |
# File 'lib/challah/facebook/interfaces/base.rb', line 5 def end |
Class Method Details
.get_access_token_for_oauth_code(code, callback_uri) ⇒ Object
These methods should be implemented by the specific interface that inherits from Base
16 17 18 |
# File 'lib/challah/facebook/interfaces/base.rb', line 16 def self.get_access_token_for_oauth_code(code, callback_uri) raise 'Not implemented: get_access_token_for_oauth_code' end |
.get_authorization_url(callback_uri, permissions = nil) ⇒ Object
32 33 34 |
# File 'lib/challah/facebook/interfaces/base.rb', line 32 def self.(callback_uri, = nil) raise 'Not implemented: get_authorization_url' end |
.get_extended_token(access_token) ⇒ Object
20 21 22 |
# File 'lib/challah/facebook/interfaces/base.rb', line 20 def self.get_extended_token(access_token) raise 'Not implemented: get_extended_token' end |
.get_facebook_uid_from_access_token(access_token) ⇒ Object
24 25 26 |
# File 'lib/challah/facebook/interfaces/base.rb', line 24 def self.get_facebook_uid_from_access_token(access_token) raise 'Not implemented: get_facebook_uid_from_access_token' end |
.get_user_info_from_access_token(access_token) ⇒ Object
28 29 30 |
# File 'lib/challah/facebook/interfaces/base.rb', line 28 def self.get_user_info_from_access_token(access_token) raise 'Not implemented: get_user_info_from_access_token' end |