【问题标题】:Opengraph meta tag og:type set to "product" errors (like button & URL linter/debug)打开 Graph 元标记 og:type 设置为“产品”错误(如按钮和 URL linter/debug)
【发布时间】:2012-01-18 18:04:33
【问题描述】:

我们最近注意到我们的 facebook like 按钮停止工作。为了调查,我通过 Facebook 的 Debugger(旧 URL Lint)工具运行了 URL,它给了我这个错误:

Object Type Not Allowed:    
Object at URL 'https://savingstar.com/coupons/boursin-cheese/4edfd63fec0f2532eb000106' of type 'og_products:product' is invalid because it the specified fb:app_id '111777372238952' is not the owner of specified og:type.

我怀疑这与新的 Open Graph Beta 类型有关,但我似乎找不到任何证据。我的怀疑是我需要删除 `fb:app_id` 以支持 `fb:admins`,但我很想知道是否有人遇到了这个问题并解决了它。

我们目前看到的示例 URL:
https://savingstar.com/coupons/boursin-cheese/4edfd63fec0f2532eb000106

这里是相关元标记的略微编辑版本,作为 Facebook URL scraper 看到它(使用调试器工具中的链接):

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="grocery,coupon,coupons,ecoupon,ecoupons,grocery coupons,food coupons,groceries coupons,coupons for food" name="keywords">
<meta content="Get our exclusive Boursin Cheese coupon - expires 1/4/2012." name="description">
<meta content="Boursin Cheese Coupon" name="title">
<meta content="Buy ANY ONE (1) variety of Boursin Cheese, Save $1.00" property="og:title">
<meta content="product" property="og:type">
<meta content="https://savingstar.com/coupons/boursin-cheese/4edfd63fec0f2532eb000106" property="og:url">
<meta content="https://static1.savingstar.com/images/dyn/1897.png" property="og:image">
<meta content="SavingStar" property="og:site_name">
<meta content="Save big $$ on your groceries with SavingStar eCoupons. Nothing to clip. Nothing to print." property="og:description">
<meta content="111777372238952" property="fb:app_id">

如您所见,我将og:type 设置为product,如此处的 facebook 喜欢按钮文档中所述:https://developers.facebook.com/docs/opengraph/#types

2011-12-14 更新:看起来我的问题很可能与此处报告并确认的错误有关 http://developers.facebook.com/bugs/285421101492706

当我确认这是我的问题的根本原因后,我会更新它。

【问题讨论】:

    标签: html tags facebook-like facebook-opengraph


    【解决方案1】:

    如果您查看官方Open Graph Protocol 页面,“产品”似乎没有og:type。官方 Google 群组中没有讨论它,但 Facebook 群组中有 one question

    您需要specify your own 命名空间并键入或使用built-ins 之一。

    【讨论】:

    • 有意思,facebook是不是决定放弃自己的open graph documentation,只支持官方的开放图协议规范?
    • 2010 文档仍适用于 Like 按钮 调试工具正在验证 F8 上宣布的(当前为 beta)2011 Open Graph API - 平台错误跟踪器中有一个关于此的开放错误报告 -显示的错误消息不应阻止您将 type:product 与简单页面一起使用
    • 谢谢伊吉。我现在明白调试工具错误与我遇到的 Facebook Like 按钮问题没有直接关系。
    • Facebook 似乎意识到了自己的方式的错误并修改了 og:type 规范。我昨天去了对象调试器,它显示“og:type”=“og_products:product”,其中我的 OG 元数据只是将“product”列为“og:type”。去图吧。
    【解决方案2】:

    我遇到了类似的问题,我发现了如何更好地调试此类问题。

    如果您在单击“赞”按钮时查看返回到 Facebook 的 POST 请求,则响应是 JSONP 错误消息:

    { "__ar" : 1,
      "jscc" : "",
      "payload" : { "error_info" : { "brief" : "Invalid url",
              "errorUri" : "/connect/connect_to_node_error.php?title=Invalid+url&body=URL+could+not+be+liked+because+it%27s+been+blocked.&hash=AQDCjOHl9oNv8d5P",
              "full" : "URL could not be liked because it's been blocked."
            },
          "show_error" : true,
          "success" : false
        }
    }
    

    more details 有一个关于此的 SO 问题。

    【讨论】:

    • 谢谢。我看到了这个问题,但似乎没有任何明确的行动方案来确定 URL 被阻止的原因。我尝试发帖到Facebook Developers group 并没有收到任何回复。我会尝试再次发布。
    【解决方案3】:

    值应该是og:product

    <meta property="og:type" content="og:product" />
    

    更多信息请听https://developers.facebook.com/docs/payments/product/

    【讨论】:

      【解决方案4】:

      最后我不得不向 facebook 提交一个“错误”,并且那里的人至少能够“取消阻止”喜欢。
      但是,现在我们会在您“喜欢”某些内容后显示“确认”链接。
      它的进展。

      不知道为什么提交“错误”是解除阻止 URL 的方法。

      感谢大家对此的帮助!

      【讨论】:

        【解决方案5】:

        使用这个&lt;meta property="og:type" content="product.group"&gt;

        【讨论】:

        • 虽然此代码可能会回答问题,但提供有关此代码为何和/或如何回答问题的额外上下文可提高其长期价值。
        猜你喜欢
        • 2011-12-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-01-26
        相关资源
        最近更新 更多