适用于 iPhone 应用程序的 Google Rich Snippets 无法正常工作

发布于 2024-12-10 02:04:18 字数 2042 浏览 3 评论 0原文

我已在我的网站上为我的 iPhone 应用 yycParking 设置了 Google 丰富网页摘要的代码。相关的 HTML 如下所示:

<div itemscope itemtype="http://schema.org/SoftwareApplication">
  <!-- ... -->
  <h2 class="txt-align-center" itemprop="description">
    <strong>yycParking</strong> provides real time updates of parking in downtown Calgary
  </h2>
  <!-- ... -->
  <div class="two-column last">
    <!-- ... -->
      <p>We created <strong itemprop="name">yycParking</strong> to enhance a service provided by ...</p>
    <!-- ... -->
  </div>
  <div class="two-column last txt-align-right">
    <!-- ... -->
      <a title="Download the YYC Parking App from the iTunes store now" href="http://itunes.apple.com/ca/app/yycparking/id460852653?mt=8" target="_blank" itemprop="url">
        <img class="alignnone size-full wp-image-436" title="app-store-badge" src="http://randomtype.ca/cms/assets/app-store-badge.png" alt="" />
      </a>
    <!-- ... -->
  </div>
  <p>
    <meta itemprop="image" content="http://randomtype.ca/cms/assets/app-icon-124x124.png" />
  </p>
</div>

您将从上面的 HTML 中看到我包含以下元素:

  • 架构:itemscope itemtype="http://schema.org/SoftwareApplication"
  • 描述:<代码>itemprop="description"
  • 名称:itemprop="name"
  • URL:itemprop="url"
  • 图片:itemprop="image"< /code>

从阅读 丰富网页摘要软件应用程序规范 我相信我已达到 4所需的项目,并正确识别了我正在遵循的模式。

通过 Rich Snippet 测试工具 我得到的结果没有将该代码段识别为 iPhone 应用程序,并跳过了漂亮的图像,例如“剪切绳子”得到。

我错过了什么吗?我想主宰卡尔加里停车市场 - 但谷歌阻碍了我!1 :P

I've setup the code for Google's Rich Snippets for my iPhone app yycParking on my website. The relevant HTML looks like this:

<div itemscope itemtype="http://schema.org/SoftwareApplication">
  <!-- ... -->
  <h2 class="txt-align-center" itemprop="description">
    <strong>yycParking</strong> provides real time updates of parking in downtown Calgary
  </h2>
  <!-- ... -->
  <div class="two-column last">
    <!-- ... -->
      <p>We created <strong itemprop="name">yycParking</strong> to enhance a service provided by ...</p>
    <!-- ... -->
  </div>
  <div class="two-column last txt-align-right">
    <!-- ... -->
      <a title="Download the YYC Parking App from the iTunes store now" href="http://itunes.apple.com/ca/app/yycparking/id460852653?mt=8" target="_blank" itemprop="url">
        <img class="alignnone size-full wp-image-436" title="app-store-badge" src="http://randomtype.ca/cms/assets/app-store-badge.png" alt="" />
      </a>
    <!-- ... -->
  </div>
  <p>
    <meta itemprop="image" content="http://randomtype.ca/cms/assets/app-icon-124x124.png" />
  </p>
</div>

You'll see from the above HTML that I've included the following elements:

  • Schema: itemscope itemtype="http://schema.org/SoftwareApplication"
  • Description: itemprop="description"
  • Name: itemprop="name"
  • URL: itemprop="url"
  • Image: itemprop="image"

From reading the rich snippet software application specs I believe I've hit the 4 required items, and properly identified the schema I'm following.

Running it through the Rich Snippet testing tool I get a result that doesn't identify the snippet as an iPhone app, and skips out the nice image like "Cut the Rope" gets.

Am I missing something? I want to dominate the Calgary parking market - but Google is holding me back!1 :P

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

萌化 2024-12-17 02:04:18

看起来,您缺少价格平均评分
我不知道是否有严格的定义需要什么和不需要什么,但添加这两个解决了我的问题。

您可能还需要考虑添加更多信息,例如操作系统和版本。

您可以在此处查看工作示例。

<dl>
    <dt>Updated:</dt>
    <dd><time itemprop="datePublished">September 29, 2011</time></dd>

    <dt>Current Version:</dt>
    <dd itemprop="softwareVersion">1.1.1</dd>

    <dt itemprop="operatingSystems" content="iOS">Requires iOS:</dt>
    <dd>4.0 and up</dd>

    <dt>Size:</dt>
    <dd itemprop="fileSize">14.2 MB</dd>

    <dt>Price:</dt>
    <dd itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        <span itemprop="price">9.99
lt;/span>
    </dd>

    <dt>Average Rating:</dt>
    <dd itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
        <span itemprop="ratingValue">3.6</span>
        (in <span itemprop="ratingCount">931728</span> ratings)
    </dd>
</dl>

PS:我不是这个主题的专家,我只是编辑了“割绳子”页面并不断测试,直到代码最少但仍然有效。 :P

As it seems, you're missing a price and an average rating.
I have no clue if there's a strict definition of what's required and what's not, but adding these two solved the problem for me.

You might also want to consider adding some more information, such as OS and version.

You can see a working example here.

<dl>
    <dt>Updated:</dt>
    <dd><time itemprop="datePublished">September 29, 2011</time></dd>

    <dt>Current Version:</dt>
    <dd itemprop="softwareVersion">1.1.1</dd>

    <dt itemprop="operatingSystems" content="iOS">Requires iOS:</dt>
    <dd>4.0 and up</dd>

    <dt>Size:</dt>
    <dd itemprop="fileSize">14.2 MB</dd>

    <dt>Price:</dt>
    <dd itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        <span itemprop="price">9.99
lt;/span>
    </dd>

    <dt>Average Rating:</dt>
    <dd itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
        <span itemprop="ratingValue">3.6</span>
        (in <span itemprop="ratingCount">931728</span> ratings)
    </dd>
</dl>

PS: I'm not an expert on this topic, I just edited the Cut the Rope page and kept testing until the code was minimal but it still worked. :P

揪着可爱 2024-12-17 02:04:18

实际的“错误”似乎是测试工具的错误。但是,我查看了您提到的“割绳子”示例,实际上拉动图像和其他格式的是 开放图协议

<meta property="og:title" content="Cut the Rope" />
<meta property="og:type" content="game" />
<meta property="og:image" content="http://chillingo.com/media/games/small/240x100_cuttherope.png" />
<meta property="og:site_name" content="Chillingo">

The actual "error" seems to be an bug with the Testing Tool. But, I looked at the "Cut the rope" example you mentioned and what's actually pulling the image and other formats is the Open Graph protocol:

<meta property="og:title" content="Cut the Rope" />
<meta property="og:type" content="game" />
<meta property="og:image" content="http://chillingo.com/media/games/small/240x100_cuttherope.png" />
<meta property="og:site_name" content="Chillingo">
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文