取れてた氏名の値が取れなくなったので調べました。
変更前:2.0.0
変更後:4.0.0
これまでのコード
取得部分 last_name = auth.info.last_name first_name = auth.info.first_name config部分 config.omniauth :facebook, 'app_id', 'app_token', locale: 'ja_JP', provider_ignres_state: true, scope: 'email, public_profile'
調べてみると、configに追加するだけで取れるようになるようです。
以下のように修正しました。
config.omniauth :facebook, 'app_id', 'app_token', locale: 'ja_JP', provider_ignres_state: true, scope: 'email, public_profile', info_fields: 'email, first_name, last_name'
参考URL
http://stackoverflow.com/questions/33090322/get-first-name-and-last-name-fields-from-facebook-omniauth
0 件のコメント:
コメントを投稿