使用自定义URL将帖子分享到LinkedIn,并指定图像

问题描述 投票:1回答:1

我能够使用他们的自定义URL API成功地向LinkedIn共享信息:

https://developer.linkedin.com/docs/share-on-linkedin

我可以指定标题,摘要等,但不能指定image。 LinkedIn通过链接页面中的og:image标记自动获取图像。

og:图像通常在200x200像素以上,但是LinkedIn正在将图像裁剪(不调整大小)为大约180 x 110。

Wordpress通常使用512x512站点图标,现在很多插件都将其拾取并默认添加为og:image图标。 (即JetPack)

如何解决此问题而又不向我的网站/页面添加很小的[non-square] og:image?

LinkedIn Share Post function

wordpress linkedin facebook-opengraph
1个回答
0
投票

要设置LinkedIn共享的预览屏幕,请设置您的og:标签...

  • <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

这是一个对我有用的例子:

© www.soinside.com 2019 - 2024. All rights reserved.