Git Product home page Git Product logo

Comments (20)

renatosnrg avatar renatosnrg commented on July 28, 2024

Hi Angela,

I've made a pull request to solve this issue.

I hope it can help you!

from linkedin.

simonmorley avatar simonmorley commented on July 28, 2024

Hi

I'm still having this issue with latest build. How can I fix?

Thanks

Simon

from linkedin.

renatosnrg avatar renatosnrg commented on July 28, 2024

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.

simonmorley avatar simonmorley commented on July 28, 2024

Thanks for the message. I get no errors with your fork but also strangely, no output?! Any suggestions?

from linkedin.

renatosnrg avatar renatosnrg commented on July 28, 2024

Can you post your code here? I'm using with no problems in my production environment.

from linkedin.

simonmorley avatar simonmorley commented on July 28, 2024

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.

simonmorley avatar simonmorley commented on July 28, 2024

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.

renatosnrg avatar renatosnrg commented on July 28, 2024

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.

marckohlbrugge avatar marckohlbrugge commented on July 28, 2024

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.

jeremyw avatar jeremyw commented on July 28, 2024

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.

marckohlbrugge avatar marckohlbrugge commented on July 28, 2024

@jeremyw, see here: #55

from linkedin.

rtlong avatar rtlong commented on July 28, 2024

I can confirm that @renatosnrg's pull request fixed it. Specifically, all I needed was one commit: renatosnrg/linkedin@90b6641

from linkedin.

javan avatar javan commented on July 28, 2024

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.

huned avatar huned commented on July 28, 2024

more productively: +1 for @renatosnrg's pull request! :)

from linkedin.

comp615 avatar comp615 commented on July 28, 2024

+1 please merge this in!

from linkedin.

lstone avatar lstone commented on July 28, 2024

Please merge this!

from linkedin.

thoughtpunch avatar thoughtpunch commented on July 28, 2024

MERGE!!@!#!@#!@#!

from linkedin.

johnsome avatar johnsome commented on July 28, 2024

+1 please merge

from linkedin.

Phiction avatar Phiction commented on July 28, 2024

+1 for merge

from linkedin.

ryanatwork avatar ryanatwork commented on July 28, 2024

This has been fixed in the last merge.

from linkedin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.