我再也无法用Omniauth
.
我认为问题出在 API 2.4,
但我不明白我怎么能得到预期的信息
设计配置
config.omniauth :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'], {
:scope => 'email',
:info_fields => 'id,email,gender,link,locale,name,timezone,updated_time,verified',
strategy_class: OmniAuth::Strategies::Facebook,
:provider_ignores_state => true}
返回的信息不包括电子邮件信息
:1> env['omniauth.auth']
{
"provider" => "facebook",
"uid" => "xxxx",
"info" => {
"name" => "Eric Hsu",
"image" => "http://graph.facebook.com/xxxx/picture?type=square"
},
"credentials" => {
"token" => "CAAh",
"expires_at" => 1443066205,
"expires" => true
},
"extra" => {
"raw_info" => {
"name" => "Eric Hsu",
"id" => "xxxx"
}
}
}