我在 Rails 中使用 omniauth-linkedin gem 并尝试从“r_fullprofile”和“r_network”获取数据。
在omniauth.rb 中:
provider :linkedin, 'consumer_key', 'consumer_secret',
:scope => 'r_fullprofile r_emailaddress r_network',
:fields => ["id", "email-address", "first-name", "last-name",
"headline", "industry", "picture-url", "public-profile-url",
"location", "connections", "skills", "date-of-birth", "phone-numbers",
"educations", "three-current-positions" ]
在控制器中:
render :text => request.env["omniauth.auth"].to_yaml
结果输出似乎只有“r_basicprofile”的数据。我怎样才能获得解析所需数据的其余部分(例如“连接”、“技能”、“教育”)?