调试器说产品缺少货币

问题描述 投票:0回答:1

Facebook对象调试器tells me

对象缺少必需的值:'product'类型的URL'http://apps.facebook.com/cpuzzle_dev/opengraph/product/facebook.v16cashbundleXL.html'处的对象无效,因为未提供类型为'string'的必需属性'product:price:currency'。

但是,当我点击“See exactly what our scraper sees for your URL”时,我得到:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta property="og:type" content="og:product">
<meta property="og:title" content="800 Puzzle Cash">
<meta property="og:image" content="http://example.com/assets/assets/platform/cash-stack-3.jpg">
<meta property="og:url" content="http://apps.facebook.com/cpuzzle_dev/opengraph/product/facebook.v16cashbundleS.html">
<meta property="og:description" content="A solid amount of Puzzle Cash">
<meta property="product:price:amount" content="3.80">
<meta property="product:price:currency" content="USD">
<meta property="product:price:amount" content="2.99">
<meta property="product:price:currency" content="EUR">
</head></html>

那么问题是什么?我该如何解决?

附加信息:如果我切换金额和货币元素的顺序,我会得到相同的错误,抱怨缺少“product:price:amount”属性。

更多附加信息:我已经更改了产品定义以完全匹配that of Facebook's sample project(有趣的是,实时示例项目缺少“产品”命名空间)。对于示例项目它是有效的,对我来说它不...

debugging opengraph payment
1个回答
0
投票

经过大量的反复试验,我终于找到了如何让Facebook接受产品定义。

真正的问题似乎不是结构或货币属性,而是og:url属性 - 显然它不能在apps.facebook.com域中,但必须使用您的服务器域。一旦我改变了,问题就消失了。

© www.soinside.com 2019 - 2024. All rights reserved.