2015-02-10 19 views
3

我使用Devise和omniauth-linkedin gem來允許用戶使用LinkedIn帳戶(Rails 4.1.8,Devise 3.4.0,omniauth-linkedin 0.2.0)登錄到我的Rails應用程序。我從LinkedIn獲取用戶的主要電子郵件並沒有問題,但我想知道是否有可能獲得與用戶的LinkedIn帳戶相關的所有電子郵件列表,包括非主要電子郵件?使用OAuth連接到Linkedin時,是否可以獲取用戶的非主電子郵件地址?

LinkedIn文檔(https://developer.linkedin.com/documents/authentication)沒有說如何做到這一點,但他們也沒有說這是不可能的。

如果可能,我需要添加到我的Devise配置中的什麼範圍/字段?目前在配置/ devise.rb相關線路是這樣的:

config.omniauth :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'], 
    scope: 'r_fullprofile r_emailaddress r_network w_messages', 
    fields: ["id", "email-address", "first-name", "last-name", "headline", 
      "industry", "picture-url", "public-profile-url", "location", 
      "connections"] 

回答

1

的LinkedIn個人資料API不公開不是與個人資料相關聯的主一個其他電子郵件地址。

相關問題