Comments (20)
Hi Angela,
I've made a pull request to solve this issue.
I hope it can help you!
from linkedin.
Hi
I'm still having this issue with latest build. How can I fix?
Thanks
Simon
from linkedin.
My pull request is not merged yet. You can try my fork until my pull request (or other fix) is not applied to the current master.
from linkedin.
Thanks for the message. I get no errors with your fork but also strangely, no output?! Any suggestions?
from linkedin.
Can you post your code here? I'm using with no problems in my production environment.
from linkedin.
Hi, sorry for the delay, I wasn't notified about a reply!
Linkedin Model:
require 'linkedin'
class LinkedinToken < ConsumerToken
def client
client = LinkedIn::Client.new(LinkedinToken.consumer.key, LinkedinToken.consumer.secret)
client.authorize_from_access(token, secret)
@client = client.profile
end
end
show:
Linkedin: <% @user.linkedin_token.client %>
I think it's a ruby error and nothing to do with your gem but I really appreciate your help :)
from linkedin.
Got it working, think there was a typo. Still a little confused though - I end us with a linkedin::mash not a hashie and have no idea how to get the data out?
from linkedin.
You can get the fields directly using LinkedIn::Mash:
profile = client.profile
first_name = profile.first_name
current_position = profile.positions.all.find{|pos| pos.is_current == true} unless profile.positions.all.nil?
profile.picture_url
from linkedin.
I was having the same problem (using OmniAuth like Simon and Angela), but your fork fixed it Renato. Thanks! Hope it gets merged with the master soon.
from linkedin.
What's going on with this? I'm seeing the same error. It looks like omniauth is not using the entire API endpoint, just a relative path.
from linkedin.
from linkedin.
I can confirm that @renatosnrg's pull request fixed it. Specifically, all I needed was one commit: renatosnrg/linkedin@90b6641
from linkedin.
This just bit me too.
>> client = LinkedIn::Client.new(API_KEY, API_SECRET)
>> client.authorize_from_access(ACCESS_TOKEN, ACCESS_SECRET)
>> client.profile
NoMethodError: undefined method `downcase' for nil:NilClass
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/request_proxy/base.rb:93:in `normalized_uri'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/request_proxy/base.rb:113:in `signature_base_string'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/signature/base.rb:77:in `signature_base_string'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/signature/hmac/base.rb:12:in `digest'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/signature/base.rb:65:in `signature'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/signature.rb:23:in `sign'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/client/helper.rb:45:in `signature'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/client/helper.rb:75:in `header'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/client/net_http.rb:91:in `set_oauth_header'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/client/net_http.rb:30:in `send'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/client/net_http.rb:30:in `oauth!'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/consumer.rb:227:in `sign!'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/consumer.rb:191:in `create_signed_request'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/consumer.rb:162:in `request'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/tokens/consumer_token.rb:25:in `request'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/tokens/access_token.rb:12:in `request'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/oauth-0.4.5/lib/oauth/tokens/access_token.rb:27:in `get'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/linkedin-0.3.1/lib/linked_in/helpers/request.rb:15:in `get'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/linkedin-0.3.1/lib/linked_in/api/query_methods.rb:32:in `simple_query'
from /Users/javan/.rvm/gems/ruby-1.8.7-p334/gems/linkedin-0.3.1/lib/linked_in/api/query_methods.rb:8:in `profile'
from (irb):10
from linkedin.
more productively: +1 for @renatosnrg's pull request! :)
from linkedin.
+1 please merge this in!
from linkedin.
Please merge this!
from linkedin.
MERGE!!@!#!@#!@#!
from linkedin.
+1 please merge
from linkedin.
+1 for merge
from linkedin.
This has been fixed in the last merge.
from linkedin.
Related Issues (20)
- Segmentation fault when used in parallel threads HOT 8
- Linkedin Group Share HOT 2
- Normal Pagination
- LinkedIn API changes HOT 1
- Documentation Links No Longer Work HOT 5
- token_secret is not passed HOT 2
- LinkedIn API returns Positions without Title HOT 6
- Does the API has stopped providing Connections HOT 3
- (400): 'submitted-url' and 'media-key' can not be both empty HOT 6
- LinkedIn API session issue HOT 1
- List of all companies where authenticated user is the Admin HOT 1
- Setting the linkedin pin at the run time HOT 1
- Unable to find client.profile for authenticated user HOT 3
- NameError: uninitialized constant Api::QueryHelpers HOT 1
- Is this gem still maintained? HOT 1
- Application does not respond after sharing content to company page HOT 1
- UnauthorizedError in callback HOT 2
- problems with the access token HOT 2
- LinkedIn v1 API deprecation HOT 11
- Incorrect tag for v1.1.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linkedin.