Created
March 29, 2019 15:16
-
-
Save edlvj/091713cecf21ffe57736295f103887ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
first_name, last_name = if data.name.present? | |
data.name.split(" ") | |
else | |
[data.first_name, data.last_name] | |
end | |
facebook_data = {"email" => data.email, | |
"given_name" => data.first_name, | |
"family_name" => data.last_name, | |
"given_name" => first_name, | |
"family_name" => last_name, | |
"username" => data.username, | |
"id" => data.id} | |
delete | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :facebook, | |
Community.first.facebook_connect_id || APP_CONFIG.fb_connect_id, | |
Community.first.facebook_connect_secret || APP_CONFIG.fb_connect_secret | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment