-
-
Notifications
You must be signed in to change notification settings - Fork 622
Examples
Peter Boling edited this page Mar 28, 2022
·
6 revisions
See: spec/examples/google_spec.rb
Use with omniauth-facebook
gem: https://github.com/simi/omniauth-facebook
Use with v2+ of this gem.
OAuth2::Response.register_parser(:facebook, []) do |body, response|
if response.headers["content-type"].to_s.include?("application/json")
OAuth2::Response::PARSERS[:json].call(body)
else
OAuth2::Response::PARSERS[:query].call(body)
end
end
OmniAuth::Strategies::Facebook.configure do |config|
config.token_params.merge!({ parse: :facebook })
end