lib/sorcery/providers/facebook.rb in sorcery-0.10.3 vs lib/sorcery/providers/facebook.rb in sorcery-0.11.0
- old
+ new
@@ -7,13 +7,13 @@
# ...
#
class Facebook < Base
include Protocols::Oauth2
- attr_reader :mode, :param_name, :parse
+ attr_reader :mode, :param_name
attr_accessor :access_permissions, :display, :scope, :token_url,
- :user_info_path, :auth_path, :api_version
+ :user_info_path, :auth_path, :api_version, :parse
def initialize
super
@site = 'https://graph.facebook.com'
@@ -22,10 +22,10 @@
@scope = 'email'
@display = 'page'
@token_url = 'oauth/access_token'
@auth_path = 'dialog/oauth'
@mode = :query
- @parse = :query
+ @parse = :json
@param_name = 'access_token'
end
def get_user_hash(access_token)
response = access_token.get(user_info_path)