-
Notifications
You must be signed in to change notification settings - Fork 48
Get email from token user #25
Copy link
Copy link
Open
Description
Hi everyone,
I have token of user and want request it to get EMAIL. HOW to config it get 'full profile' instead 'basic profile'
my code:
IN devise.rb:
config.omniauth :linkedin, "vuq..fnwb51g", "113e5p...9wpKjG5", :scope => 'r_fullprofile r_emailaddress r_network rw_nus', :fields => ["id", "email-address", "first-name", "last-name", "headline", "industry", "picture-url", "public-profile-url", "location"]
Code request:
client = LinkedIn::Client.new(config[:consumer_key], config[:consumer_secret])
client.authorize_from_access(oauth_access_token, oauth_access_token_secret)
profile = client.profile(:scope=>'r_fullprofile')
puts profile.to_json
{"first_name":"test","headline":"Student at abc","last_name":"mely","site_standard_profile_request":{"url":"http://www.linkedin.com/profile/view?id=288....80&authType=name&authToken=I3GR&trk=api*a3...21*s3344461*"}}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels