Created
August 28, 2012 13:57
-
-
Save gcaixeta/3498224 to your computer and use it in GitHub Desktop.
how to get the original picture-url from the linkedin gem api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c = LinkedIn::Client.new | |
c.authorize_from_access authentication.token, authentication.secret | |
c.search(fields: [{:people => [:picture_url]}]).people.all.first.try(:picture_url) | |
#or better | |
c.profile(:fields => ['picture-urls::(original)']).picture_urls.all.first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot! You are a star!