我对有关社交媒体共享链接的linkedin API有一些疑问。会显示api(https://developer.linkedin.com/docs/share-on-linkedin),而忽略url参数,还会显示诸如title或summary的其他参数。但是,如果我从文档中调用该网址,例如:https://www.linkedin.com/shareArticle?mini=true&url=http://developer.linkedin.com&title=LinkedIn%20Developer%20Network&summary =我的%20favorite%20developer%20program&source = LinkedIn
它重定向到https://www.linkedin.com/sharing/share-offsite/?url=http%3A%2F%2Fdeveloper.linkedin.com但没有参数。
这是linkedin API的更改还是临时问题?还是我的理解存在问题?
最好的问候理查德
自从LinkedIn被Microsoft收购以来,LinkedIn发生了很多变化。您曾经为title
等工作的东西,但是不再。这是允许您使用的唯一可用格式...
https://www.linkedin.com/sharing/share-offsite/?url={url}
来源:Official LinkedIn Sharing Documentation。
预览title
,image
等的唯一方法是使用og:
标签。将它们插入HTML的<head>
块中...
<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" />
来源:LinkedIn Developer Docs: Making Your Website Shareable on LinkedIn。
并且,如果您想确保自己做的一切正确,请将网站的URL插入LinkedIn Post Inspector。