Opengraph元标记og:类型设置为“产品”错误(如按钮和URL linter / debug)

时间:2011-12-12 19:09:29

标签: html tags facebook-like facebook-opengraph

我们最近注意到我们的facebook按钮停止工作。为了调查我通过Facebook的调试器(旧的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,但我很乐意听到是否有其他人遇到此问题并解决了它。

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

以下是Facebook URL剪贴板看到的相关元标记的略微编辑版本(使用调试工具中的链接):

<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 like-button文档中所述:https://developers.facebook.com/docs/opengraph/#types

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

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

4 个答案:

答案 0 :(得分:5)

如果您查看官方Open Graph Protocol页面,看起来“产品”没有og:type。谷歌官方集团没有讨论它,但Facebook集团有one question

您需要specify your own命名空间并输入或使用其中一个built-ins

答案 1 :(得分: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对此有疑问。

答案 2 :(得分:0)

最后我不得不向facebook提交一个“bug”,其中有人至少能够“解锁”喜欢的内容。
但是,现在我们在“喜欢”某事后会出现“确认”链接 它的进展。

不确定为什么提交“错误”是获取网址解除阻止的方法。

感谢大家对此的帮助!

答案 3 :(得分:0)

使用这个<meta property="og:type" content="product.group">