Question

I'm implementing a Compony newsfeed on a website and ran into the following problem. The LinkedIn API doesn't provide a direct URL to a company update. Looking at the LinkedIn site there are direct URL's and they're like this for example: https://www.linkedin.com/company/1441/comments?topic=5849556347070205952&type=U&scope=1441&stype=C&a=5uHW&goback=%2Ebzo_*1_*1_*1_*1_*1_*1_*1_1441

Trying stuff out it seems that the parameters topic, type, scope, stype and a are mandatory for the URL to work.. (goback is the only one that isn't).

Using the LinkedIn API with the Company updates call I'm able to buid the direct url, except for the a parameter. The value is always 4 (for me unexplainable) characters long.

Has anyone ever successfully build a direct URL to a company update or can someone maybe explain the a parameter or how to generate its value?

Was it helpful?

Solution

Updated to new format

You can link directly to any update (company or user) using the following url:

https://www.linkedin.com/feed/update/urn:li:activity:[topic_id]

You can get [topic_id] by getting the last bit of the updateKey in the api response from Linkedin. When updateKey = UPDATE-c7352-6410848097894756353, your topic_id = 6410848097894756353.

In your example that would become https://www.linkedin.com/feed/update/urn:li:activity:5849556347070205952 which links directly to the specific update. The post is too old to work with the new link format


The url used to be

https://www.linkedin.com/nhome/updates/?topic=[topic_id]

Updated thanks to the comment from @sethpollack

OTHER TIPS

For anyone trying to get the topic id from the API response object (as already commented on the OP question), the topic id is the value after the last hyphen of the updateKey property, which can be used with @Daan answer:

"updateKey": "UPDATE-cXXXX-YYYYYYYYYYYYYYYYYY"

Direct URL:

https://www.linkedin.com/nhome/updates?topic=[YYYYYYYYYYYYYYYYYY]

Using the URL format above, get the topic_id by opening the update in its own window/tab, look at the page source code in your browser and search for the string :activity: the long number after the string is the infamous topic_id

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top