如果您是应用的开发者/所有者,我认为会出现此错误,请尝试使用其他帐户
我自己刚刚解决了这个问题,还没有完成回调,我会编辑我的答案。希望这对某人有用。首先制作一个图形对象
<head prefix=
"og: http://ogp.me/ns#
fb: http://ogp.me/ns/fb#
product: http://ogp.me/ns/product#">
<meta property="og:type" content="og:product" />
<meta property="og:title" content="Friend Smash Coin" />
<meta property="og:plural_title" content="Friend Smash Coins" />
<meta property="og:image" content="http://www.friendsmash.com/images/coin_600.png" />
<meta property="og:description" content="Friend Smash Coins to purchase upgrades and items!" />
<meta property="og:url" content="https://www.yourdomain.com/test.html" />
<meta property="product:price:amount" content="0.30"/>
<meta property="product:price:currency" content="USD"/>
<meta property="product:price:amount" content="0.20"/>
<meta property="product:price:currency" content="GBP"/>
</head>
将此保存为 html 文件并将其上传到您的服务器,比如说 yourdomain.com/test.html
访问此页面https://developers.facebook.com/tools/debug 并在此处输入您的新网址 (yourdomain.com/test.html)
将下面的产品网址更改为您的域 (yourdomain.com/test.html)
<h2>Purchase a product:</h2>
<button id="pay">Buy Product</button>
<div class="returndata" id="output"></div>
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : 'APPID',
status : true,
cookie : true,
xfbml : true
});
function buy() {
var obj = {
method: 'pay',
action: 'purchaseitem',
product: 'http://yourdomain.com/test.html'
};
FB.ui(obj, function(data) {
console.log(data);
});
}
document.getElementById('pay').onclick = function() {buy()};
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) { return; }
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>