class Jm81auth::OAuth::Facebook

Constants

ACCESS_TOKEN_URL
DATA_URL

Public Instance Methods

get_access_token() click to toggle source
# File lib/jm81auth/oauth/facebook.rb, line 7
def get_access_token
  response = client.post(ACCESS_TOKEN_URL, @params)
  JSON.parse(response.body)['access_token']
end
get_data() click to toggle source
# File lib/jm81auth/oauth/facebook.rb, line 12
def get_data
  response = client.get(
    self.class::DATA_URL, access_token: @access_token,
    fields: 'id,name,email'
  )
  @data = JSON.parse(response.body)
end