Loading mulitple LinkedIn share buttons dynamically and asynchronously

后端 未结 3 858
遥遥无期
遥遥无期 2021-01-19 19:35

I have a page showing thumbnails of posts. The posts are fetched via AJAX and a filter allows for different posts to be fetched. When a thumbnail is clicked, a carousel open

3条回答
  •  花落未央
    2021-01-19 20:37

    Seems like you're doing some really amazing coding gymnastics just to be able to share a link on LinkedIn. Why not try something simpler?

    https://www.linkedin.com/sharing/share-offsite/?url={url}
    

    Then you can hyperlink anything you want, control it with whatever CSS and JS you want, etc..

    Source: Microsoft LinkedIn Share URL Documentation.

    For example, this works for me:

    https://www.linkedin.com/sharing/share-offsite/?url=http://www.wikipedia.org/

    Works fine:

提交回复
热议问题