如何获取要使用LinkedIn Share API显示的描述字段 [英] How to Get Description Field to Display with LinkedIn Share API

查看:62
本文介绍了如何获取要使用LinkedIn Share API显示的描述字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将此JSON发布到Share API时:

When I post this JSON to the Share API:

{
  "comment": "Here is my comment",
  "content": {
    "title": "Here is my title",
    "description": "Description:  The picture will be of a blue and gold macaw",
    "submitted-url": "https://en.wikipedia.org/wiki/Macaw",  
    "submitted-image-url": "http://yourshot.nationalgeographic.com/u/ss/fQYSUbVfts-T7pS2VP2wnKyN8wxywmXtY0-FwsgxoJBD4C1qJrqA8EfaP7jL8gZYg0MJlb9NNBxrHhmaSdwF/"
  },
  "visibility": {
    "code": "anyone"
  }  
}

我在活动中看到了这一点

I see this in the Activity:

我看不到描述字段中的内容.我没有为此编写原始集成,但是我的项目经理声称LinkedIn UI最初显示了这些描述.有什么改变吗?我们做错什么了吗?

What I don't see is the content in the description field. I did not write our original integration to this, but my project manager claims that the LinkedIn UI originally showed these descriptions. Has something changed? Are we doing something wrong?

更新:

我刚刚在这里注意到了一个类似的问题:

I just noticed a similar question here:

在LinkedIn上共享说明"字段未显示在新用户界面中

实际上我不确定应该从SO的角度做些什么,因为我提供了一些额外的内容,我认为这些内容将有助于发现问题.

I'm actually not sure what I should do from an SO perspective since I provided extra content that I think would be helpful in identifying the problem.

推荐答案

我花了两周的时间与LinkedIn支持人员和开发人员讨论了此问题. 哦,人类... 简要摘要...

I have spent two weeks talking with the LinkedIn support staff and developers about this problem. Oh the humanity... Succinct summary...

  • 如果已定义图像(使用og:image或API),则 然后共享预览中将不会显示任何说明.
  • 如果您没有定义图像(使用og:image或API),但是定义了描述(使用og:description标签或API),则 然后描述将显示在共享预览中.
  • em>
  • If you have an image defined (using og:image or API), then no description will display in share preview.
  • If you have no image defined (using og:image or API), but you have a description defined (using og:description tag or API), then description will display in share preview.

最简单的测试方法? GitHub具有og:image标签,但是Wikipedia没有og:image标签.他们在LinkedIn中的社交共享中是什么样子?

Easiest way to test? GitHub has an og:image tag, but Wikipedia does not have an og:image tag. What do they look like in social sharing in LinkedIn?

维基百科::没有og:image标签,但显示了og:description.
GitHub:

Wikipedia: No og:image tag, but og:description displays.
GitHub: Yes og:image tag, but no og:description displays.

我也经历了制作一个超级简单的演示来检验这个假设的麻烦...

I also went through the hassle of making a super simple demo to test this hypothesis...

工作于没有og:image标签的LinkedIn共享链接演示 :

Working LinkedIn Share Link Demo Without og:image Tags:

<HTML><HEAD>
    <meta property="og:title" content="LinkedIn Share URL Test">
    <meta property="og:description" content="Testing description!">
    <meta property='og:url' content="https://www.revoltlib.com/linkedin-social-share-url-test.html"/>
</HEAD><BODY>This page has no og:image tag.</BODY></HTML>

您无需麻烦地找到带有 og:image标签的站点 ,基本上每个站点都拥有它!

You shouldn't need to have trouble finding a site with og:image tags, basically every site seems to have it!

经过全面测试,看来已经退房了!我很清楚

After thorough testing, it seems to check out! I'm well aware that the Official Microsoft LinkedIn Share Documentation makes no mention whatsoever of this, but all of the real evidence seems to point in the opposite direction.

这篇关于如何获取要使用LinkedIn Share API显示的描述字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆