GithubHelp home page GithubHelp logo

Comments (11)

thiagopradi avatar thiagopradi commented on July 28, 2024 1

@dsandstrom - I've tried here again and could make it work - I was passing the wrong URN. Your work saved my day - thanks!

from linkedin.

hexgnu avatar hexgnu commented on July 28, 2024

Hey @tobiasmanroth most likely not.

If you want to submit a PR I am more than willing to review and merge it in.

Thanks!

from linkedin.

dsandstrom avatar dsandstrom commented on July 28, 2024

Looking for this too. I found a couple gems that seem to be what we want, but don't work for me:

  1. https://github.com/emorikawa/linkedin-oauth2
  2. https://github.com/mdesjardins/linkedin-v2

The first one doesn't use v2 urls so not sure if it ever worked. The second is a fork made because their PR wasn't merged. Couldn't install the gem because it needs faraday 0.11.0 and other gems need < 0.10.0. I tried forking and editing the gemspec, but I couldn't get it to work.

I was able to fork this gem and edit the url prefix and update the share code. However, LinkedIn now requires you to send the user's uid along with the content so it makes things a lot more complicated.

https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/share-on-linkedin?context=linkedin/consumer/context

from linkedin.

tobiasmanroth avatar tobiasmanroth commented on July 28, 2024

According to the "important" note on the bottom over there: https://docs.microsoft.com/en-us/linkedin/marketing/

You need to have executed a separate signed partnership agreement with linked in / Microsoft to use their api. The api change is hilarious :)

from linkedin.

dsandstrom avatar dsandstrom commented on July 28, 2024

Pushed an incomplete PR #274 . Not sure if I will go any further than that, but wanted to upload what I got working.

from linkedin.

dsandstrom avatar dsandstrom commented on July 28, 2024

Another thing to note is mdesjardins/linkedin-v2 uses the "share" API (https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api). However, LinkedIn provides a link to a different set of docs: https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/share-on-linkedin?context=linkedin/consumer/context . It shows the UGC Post API. According to LinkedIn:

UGC Post is an upcoming API that will eventually replace the Shares API.

So it would be more future proof to use the UGC Post API now.

By the way, I was able to get the linkedin-v2 gem installed, but couldn't get it to work. I'm just getting errors about the urn. Not sure what format the gem wants it in and I didn't see any suggestions in the code. I'll probably stick with my branch represented by #274.

from linkedin.

dsandstrom avatar dsandstrom commented on July 28, 2024

My fix is not working in production. I receive error LinkedIn::Errors::UnauthorizedError ((401): Invalid access token) when I hit the ugcPosts endpoint. My process works in development, but I can't use their API in production.

from linkedin.

dsandstrom avatar dsandstrom commented on July 28, 2024

The token can be 350 characters long. Make sure you change your column type to text or varchar(400).

from linkedin.

thiagopradi avatar thiagopradi commented on July 28, 2024

hi @dsandstrom - Did you manage to make the share API work in your production env? facing the same issue here.

from linkedin.

dsandstrom avatar dsandstrom commented on July 28, 2024

Yeah, the comment above. My token column was limited to 255 characters, but the new tokens are 350 long. Once I increased the limit (along with #274), things started working.

Yes I know, I need to use the same dbs for dev and production.

from linkedin.

colin-kudos avatar colin-kudos commented on July 28, 2024

In the same boat going to give @dsandstrom work a shot!

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.