Rails:Twitterの情報(nameやnickname)を取得する
providerとuidは保存できているけど、nameやnicknameが保存できていないと思っていたら、入っている階層が違ったのでした。
{"provider":"twitter", "uid":"xx4xxxx3", "info:{"nickname":"kgmx","name":"kgmxxxxx","location":"hogehoge","image":"http://pbs.twimg.com/profile_images/462574300055093248/JRWbzU4K_normal.jpeg","description":"hogehoge", "urls":{"Website":"http://t.co/85OlPoS0ao","Twitter":"https://twitter.com/kgmx_xxx"}}.....}
nameやnicknameはinfoの中にあって、TwitterのURLはさらにその中のurlsの中にあった。
というわけで、omniauth_callbacks_controller.rb
の中は以下のようになった。