examples/facebook_auth/lib/models/facebook_user.rb
# frozen_string_literal: true
class FacebookUser
def initialize(access_token)
@access_token = access_token
end
def profile
client = FacebookClient.new
FacebookProfile.new(client.authorized_get('/me', @access_token).deserialise)
end
def authenticated?
!@access_token.empty?
end
end