Class: OauthTokenVerifier::Providers::Facebook

Inherits:
Object
  • Object
show all
Defined in:
lib/oauth_token_verifier/providers/facebook.rb

Defined Under Namespace

Classes: BaseFields

Instance Method Summary collapse

Constructor Details

#initializeFacebook

Returns a new instance of Facebook.



8
9
10
11
# File 'lib/oauth_token_verifier/providers/facebook.rb', line 8

def initialize
  @data_fields = Struct.new(*config.fields_mapping.values)
  @request_fields = config.fields_mapping.keys.join(',')
end

Instance Method Details

#verify_token(context) ⇒ Object



13
14
15
16
17
# File 'lib/oauth_token_verifier/providers/facebook.rb', line 13

def verify_token(context)
  uri = build_uri(context.token)
  response = check_response(uri)
  parse_response(response)
end