我的 schema/Organization 的应用搜索 API 验证失败?

App search API validation failed for my schema/Organization?

我正在尝试验证组织标记的架构。 (https://search.developer.apple.com/appsearch-validation-tool)

我正在使用 JSON-LD 标记,如下所示。

 <script type="application/ld+json">
    {
      "@context" : "http://schema.org",
      "@type" : "Organization",
      "name" : "XYZ Pvt Ltd",
      "url" : "http://zyz.com/",
      "logo": "http://zyz.com/images/americos-logo.png",
      "contactPoint" : [{
        "@type" : "ContactPoint",
        "telephone" : "+91-79-6605-3111",
        "contactType" : "customer service"
      }],
      "sameAs" : [
        "https://www.facebook.com/xyz",
        "https://twitter.com/xyz",
        "https://www.linkedin.com/company/xyz",
        "https://plus.google.com/xyz/posts"
      ]
    }
    </script>

但我收到如下错误“无法提取图像尺寸。了解如何使用开放图谱协议包含图像尺寸。”

如何在徽标的 JSON-LD 标记中指定徽标尺寸?

测试工具只允许您从 URL,而不是代码,您未使用的 http://schema.org/Organization you can see there is no option to add logo dimension unless you use the http://schema.org/ImageObject 模式进行验证,您的标记在结构化数据 linter 和 google的工具。

错误实际上是说:

了解如何使用 Open Graph Protocol

包含图像尺寸

问题是开放图,而不是 schema.org - og 标签不提供徽标的图像大小 - 因此请将它们添加到该部分的标签中。 Facebook 的开放图工具将允许您将它们与其余代码分开验证。

有关语法,请参阅 http://og.me

更新

你原来的错误现在已经消失了。剩下的 open graph 错误有几个,包括关于您的图像的错误 - 您的徽标 http://americostech.com/images/americos-logo.png 是 161px x 42px,最小尺寸必须是 200px x 200px(或删除 og:image <meta> <head> 中的标签或使用不同的图像)

使用this tool's results查看消息,这里是问题标签的示例:

<meta property="og:type" content="website" />
<meta property="og:description" content="We are popular and can make YOU too. Our apps have been featured by Apple, Google and many prominent tech and lifestyle sites." />

对于其余的消息,除了 Deeplinks 之外,大多数都是建议,这取决于您是选择 facebook、twitter 还是其他方法 - 错误结果页面为您提供带有示例的链接,这确实需要打开一个新问题。原来的错误现在已经解决了。

更新 2

JSON-LD(以及所有 schema.org 格式)不允许您指定徽标尺寸(或任何图像的尺寸),除非您嵌套 http://schema.org/ImageObject inside the original, you can then set the height, width and many other properties, use the following in place of the "logo": line in the original JSON-LD to do this, example taken from google's structured data examples for a movie's image。尺寸似乎假定像素大小,schema.org 的文档似乎建议值或带单位的值(例如距离)是可以接受的。

  "logo": {
"@type":"ImageObject",
"height":600,
"width":400,
"url":"http://www.hulu.com/images/124564.jpg"
},