App search API validation failed for my schema/Organization?

295 views Asked by At

I am trying to validate my schema for organization markup. (https://search.developer.apple.com/appsearch-validation-tool)

I am using JSON-LD markup as below.

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

But I am getting error as follows "Could not extract image dimensions. Learn how to include image dimensions using the Open Graph Protocol."

How can I specify logo dimensions within JSON-LD markup for logo ?

1

There are 1 answers

4
Mousey On BEST ANSWER

the testing tool only lets you validate from a URL, not from the code, from http://schema.org/Organization you can see there is no option to add logo dimension unless you use the http://schema.org/ImageObject schema which you are not using, your markup validates in the structured data linter and google's tool.

The error actually says:

Learn how to include image dimensions using the Open Graph Protocol

The problem is open graph, not schema.org - the og tags do not give the image size for the logo - so add them in your tags in the section. Facebook's open graph tool will allow you to validae them separately to the rest of the code.

See http://og.me for syntax.

Update

Your original error has now gone. The remaining open graph errors are several, including the one about your image - your logo http://americostech.com/images/americos-logo.png is 161px by 42px, the minimum size must be 200px by 200px (or remove the og:image <meta> tag in <head> or use a different image)

Use this tool's results to view the messages, here is an example of what the problem tags should look like:

<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." />

For the remaining messages, most are recommendations except for Deeplinks, which depends on whether you choose facebook, twitter or another approach - the error results page gives you links with examples and this would really need a new question being opened. The original error is now resolved.

Update 2

JSON-LD (and all schema.org formats) don't allow you to specify logo dimensions (or dimensions of any image) unless you nest the 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. Dimensions appear to assume pixel sizes and the documentation for schema.org seems to suggest either values or values with units (eg. for Distance) are acceptable.

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