VzrivPaket
VzrivPaket

Reputation: 1

LinkedIn sharing SHARE_URL#HASH URL Param

I am faced with a LinkedIn sharing issue. This issue probably reproducible from March 1st 2019.

I share some url e.g. https://www.linkedin.com/sharing/share-offsite/?url=SHARE_URL#HASH Worked before: link in post(href) - SHARE_URL#HASH Works now: link in post(href) - value of og:url meta tag from SHARE_URL#HASH page

So we lose request parameters in SHARE_URL and #HASH

How we can pass link for LinkedIn post into request?

Upvotes: 0

Views: 949

Answers (1)

HoldOffHunger
HoldOffHunger

Reputation: 20931

You need to do URL-encoding with parameters you are feeding to another URL. So, this is what you should want...

https://www.linkedin.com/sharing/share-offsite/?url=SHARE_URL%23HASH

Remember, URL's use things like ? and # to indicate a special argument occurring after this character. So, for instance, example.com/share.php?title=thisistitleright?&..., how would the browser know that the first ? indicates the GET param and the second ? is a part of the title argument? Easy: URL encoding.

In case you want to know more: Official LinkedIn Share Documentation

Upvotes: 1

Related Questions