Closed sachin-arshna closed 11 months ago
In browser, the share button for LinkedIn works only if you're already logged in to LinkedIn. When it comes to the phones, it's up to the app developer to include a share screen, and it seems like it doesn't :( I'll see if I can make this work, but don't expect much 😅
Thanks for looking into it.
So, no good news. I've had a look at the LinkedIn app, and here's what I've found:
The LinkedIn app has a screen for sharing stuff; it's the one that you can access if you click "Share" from any other app and choose LinkedIn. Sadly, this one cannot be opened in any other way. There are deep link filters in the app, but they only work with profile pages and posts.
As such, the only way to make the LinkedIn button work with the LinkedIn app is to use the catch-all share button:
<div class="shareon">
<a class="web-share">
</div>
The web-share
button will only be shown on devices that support it (smartphones, Safari on macOS, and Microsoft Edge on Windows)
I integrated shareon.js (https://giddysouls.com/category/mushroom-supplements/mushroom-supplements.html) which works great for most except the LinkedIn button just takes me to the home page at LinkedIn. I noticed the same behaviour on the LinkedIn shareon.js home page button.
Update: Share seems to work fine on the desktop - creates a post in Linkedin in a browser tab. My issue above was observed on an Android phone with a Linkedin app installed. In which case, it opens the app but the share isn't present. Share works fine with WhatsApp, Reddit apps installed on the same phone.