LinkedIn Share Post URL - linkedin

I have an app that lets people post content to their LinkedIn page. What I want to do is create a button that I can include in an email that when clicked, will send the user to LinkedIn and open the box to share a post. What I would like to know is how to generate this url. What is the structure like? All the information I've found so far is about how to share a link to another website on LinkedIn, not how to direct a user to the share post box.
Example link: https://www.linkedin.com/share?id=0123456789

First step, let's see what URL is right...
2010:
https://www.linkedin.com/cws/share?url={url}
2015:
https://www.linkedin.com/shareArticle?url={url}&title={title}&summary={text}&source={provider}
2020:
https://www.linkedin.com/sharing/share-offsite/?url={url}
Official Microsoft LinkedIn Share API Documentation. Of course, don't take our word for it! Any of the above URL formats will redirect to the 2020 URL format.
Second step, just how do you use things like `summary`, `title`, etc.?
Use og: tags in the <head> block of your HTML! To quote the documentation, these should look like...
<meta property='og:title' content='Title of the article'/>
<meta property='og:image' content='//media.example.com/ 1234567.jpg'/>
<meta property='og:description' content='Description that will show in the preview'/>
<meta property='og:url' content='//www.example.com/URL of the article' />
Source: LinkedIn Share Documentation: Making Your Website Shareable on LinkedIn
Third step, now want to check to see you did everything right?
That's the easy part! Take the URL you are sharing (i.e., example.com, not linkedin.com?share=example.com), and input it into the LinkedIn Post Inspector. You will be told everything that goes into determining how your webpage is shared on LinkedIn, from og: tags to oEmbed data.
Here's an online demo with share links to 20+ services. Check the source code and you can see first-hand how the share link for Linkedin works!
Fourth step, why doesn't the `og:description` tag work?
I have a more detailed answer elsewhere on the og:description tag not displaying in the LinkedIn preview.
If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check it out! I'm a contributor! Social Share URLs

From the LinkedIn developer docs ("Customized URL" tab):
https://www.linkedin.com/shareArticle?mini=true&url=http://developer.linkedin.com&title=LinkedIn%20Developer%20Network&summary=My%20favorite%20developer%20program&source=LinkedIn

Had issues with LinkedIn Sharing and found a resolve:
Sites shared with Non-SSL (http) addresses will display the error: "Something went wrong - Try again"
https://www.linkedin.com/sharing/share-offsite/?url=http://example.com
How to fix the "Something went wrong" share link error:
Modify the beginning the {url} - replacing the http with https:
https://www.linkedin.com/sharing/share-offsite/?url=https://example.com
Visit the link to generate LinkedIn's thumbnail and page description.
Both share link addresses for Non-SSL (http) and SSL (https) will work correctly now.
Edit: Replace //example.com with your website

Related

LinkedIn Share API throws a 500 error for our URL

We're trying to implement a basic LinkedIn share link using the LinkedIn Share API but are running into issues when we try and share our web application URL in particular
JS Fiddle of our implementation with our URL:
https://jsfiddle.net/Jmackus/qthgoeL1/3/
<a target="_blank" rel="noopener noreferrer" href="https://www.linkedin.com/sharing/share-offsite/?url=https://hcm616.peoplestreme.net/linkedintest-sandbox/erec_external.asp">Share this on LinkedIn</a>
We get the below errors from LinkedIn:
in the browser: "Something went wrong"
and in the console: 500 Console error
A 500 error also occurs when using the LinkedIn Post Inspector for our URL as well:
LinkedIn Post Inspector error
Post Inspector URL:
https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fhcm616.peoplestreme.net%2Flinkedintest-sandbox%2Ferec_external.asp%3FjobId=1
Changing browsers and LinkedIn accounts doesn't resolve the issue and at this point we are unsure what's causing the issue
Does anyone have any ideas on what may be causing this?
Your webpage is entirely generated in JavaScript, so there's nothing that the LinkedIn share URL can get to generate a preview. It needs that preview, so it can say "WebSite.com Article Site", so that people on their platform know exactly what they're sharing, etc..
Set your og: tags in the <head> block of your HTML, like so...
<meta property='og:title' content='Title of the website'/>
<meta property='og:image' content='//media.example.com/ 1234567.jpg'/>
<meta property='og:description' content='Description that will show in the preview'/>
<meta property='og:url' content='//www.example.com/URL of the article' />
Source: LinkedIn Share Documentation: Making Your Website Shareable on LinkedIn
But, as you say, I plugged in your URL to the LinkedIn Post Inspector, and that indicates it is getting a server 500 error. I suspect there may be some server-side blocking against code LinkedIn connecting to your site?
Here's a website where I coded it up and it works perfectly: SortWords.com: Demo Dev Site. Check out the code -- sharing on LinkedIn is no problem. Why not copy/paste the URL used in the demo site here into new-test-page.html, upload it directly to your server, and see if you still have problems? And maybe try again after that with new-test-page.php?
Hopefully, it's just the og: tags! But I'm curious about the results after implementing that.

Facebook sharing debugger says The specified 'fb:app:id' property is not a valid app ID

Hi I am trying to scrape a big thumbnail from a Wordpress URL and I have added the app Id on to a plugin and also added the meta tag on to the header with the following
<meta property="fb:app_id" content="XXXXXXXXXXX" />
but the facebook debugger says that the app id property is not a valid app ID.
Any help will be appreciated!
Naveen
Try doing this with Yoast SEO. It has excellent documentation on this subject.
I think you should re-check the app ID in your developers account on Facebook. You can see, edit and add apps here:
https://developers.facebook.com/apps/

Open Graph on LinkedIn does not work for my client's site

For some reason sharing links on LinkedIn from my client's site does not work.
I've checked the specifications on https://www.linkedin.com/help/linkedin/answer/46687/making-your-website-shareable-on-linkedin?lang=en and it looks like all the og meta tags re correct. Sharing on other social media works without problems. It's only on LinkedIn where the Open Graph data is not picked up.
Here is a sample URL which does not work on LinkedIn:
https://nomadandvillager.com/bestemmingen/kenia/mbara/vrouwenbesnijdenis/
Am I missing something?
Would you be able to share a bit more on how you're getting the tags to render on Facebook and the like?
I encountered the same problem (My site runs on Angular), but my approach was to redirect the LinkedInBot via .htaccess.
Eventually, I gave up, and wrote a custom share button with LinkedIn's rest API
With it, you will be able to specify the details of the share, and avoid the messy workarounds for LinkedIn.
Direct Sharing on LinkedIn
Sharing via REST API
Original link: http://blog.crazy.technology/post/Clash-of-Clans---How-to-use-the-Web-API-570dd2b2

LinkedIn and Open Graph : site not shareable on LinkedIn without reason

I'm trying to make my website shareable on LinkedIn.
URL : https://www.jedecouvremercator.com/
My website is W3C validate. I have followed all the LinkedIn recommendations and Google recommendations. My Open Graph meta is correct and the website is shareable on all other platforms.
But when I'm trying to share it on LinkedIn or when I use a custom link to share it, LinkedIn can't display the meta information.
(I always use garbage into the URL to kill cache before verifying my changes).
Can somebody tell me why?
Thanks a lot.
The site in your URL is down, and you didn't post any code, so that makes this difficult, but not impossible. I can still view your URL through archive.org, and when I try to share the archive.org URL, like this...
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fweb.archive.org%2Fweb%2F20190618064744%2Fhttps%3A%2F%2Fwww.jedecouvremercator.com%2F
When I click the above, everything works perfectly fine for me. Example:
If you need more info: Official LinkedIn Documentation for Formatting URL and Official LinkedIn Documentation for OpenGraph Tags and Prefilled Sharing.

No image and title when sharing my blog post on LinkedIn

While I'm trying to share a post from my blog on Linkedin, I don't see the thumbnail image and the title of the post. Not see it both on Linkedin's preview window or in the Linkedin's feed, after sharing it.
I do have correct og meta description (Using Yost SEO Plugin) on my page.
When I'm trying to share the same page via Facebook it is working perfectly well.
It seems like, from some reason Linkedin not "reading" my website and see my meta data.
The post I'm trying to share is:
https://www.zoliro.com/topi-and-zoliro-event-bag-announce-strategic-partnership/
(But the same problem happening when trying to share any other post from my blog)
and you can see below that I have correct meta data:
<meta property="og:title" content="Topi and Zoliro announce strategic partnership" />
<meta property="og:description" content="Announcement - Together Topi and Zoliro - the digital event bag, will combine forces to conquer decreasing attention spans and work with event organizers to bring in-event attendee engagement to the next level." />
<meta property="og:url" content="https://www.zoliro.com/topi-and-zoliro-event-bag-announce-strategic-partnership/" />
<meta property="og:site_name" content="Zoliro" />
<meta property="og:image" content="https://www.zoliro.com/wp-content/uploads/2015/09/Topi-strategic-partnership-announcement.png" />
I think it's may be connected to the "HTTPS" because if I'm trying to share from my test site on (Which I'm not using SSL there):
http://ws-test.zoliro.com/ben-scheim-best-addition-to-your-sponsorship-package/
It's working.
Is anyone here can advise with that issue please?
Many thanks.
Eventually, our dev team has figured it out:
On the default config file of our Apache server, our domain was defined as a naked domain (domainname.com) while on our Wordpress config file, the domain was defined as a full domain (www.domainname.com).
Apparently, for Linkedin it looks like we forced him to do a redirect to another host and Linkedin doesn't support that.
After we'd defined all configs as full domain it works perfectly.

Resources