Create direct url to LinkedIn company update

后端 未结 3 725
天命终不由人
天命终不由人 2021-02-07 18:25

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

相关标签:
3条回答
  • 2021-02-07 18:33

    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

    0 讨论(0)
  • 2021-02-07 18:47

    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]
    
    0 讨论(0)
  • 2021-02-07 18:53

    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

    0 讨论(0)
提交回复
热议问题