如何使用gem’inlease’登录用户的完整个人资料信息,:git =>“git://github.com/pengwynn/linkedin.git”?
我正在使用gem 'linkedin', :git => "git://github.com/pengwynn/linkedin.git"
当我创建客户端并获取配置文件时,我得到以下值
headline: url: last_name: first_name:summary
我的问题是如何获得用户的
picture-url,public_profile_url: location: country: school_name: degree: field_of_study: start_date: end_date:
使用picture_url如下
client.profile(:fields => [:headline,:first_name,:last_name,:picture_url,:educations,:positions])client.profile(:fields => [:headline,:first_name,:last_name,:picture_url,:教育,:职位])
有关您可以使用的所有字段的列表,请参阅LinkedIn上的文档https://developer.linkedin.com/documents/profile-fields
#Gemfile gem 'linkedin-oauth2', '~> 1.0.0' # Other file api = LinkedIn::API.new(linkedin.token) profile = api.profile( fields: [ :headline, :first_name, :last_name, :email_address, :phone_numbers, :im_accounts, :industry, :main_address, :primary_twitter_account, :picture_url, :public_profile_url, :positions ] )