0

When I invoke facebook javascript to implement payment feature, I always got the error code: 1383146, and error_message: "invalid og type. Expected og:product, got website". The code is copy from facebook example:

function buy() {
    var obj = {
        method: 'pay',
        action: 'purchaseitem',
        product: 'https://xxxxxx/test3.html'
    };

    FB.ui(obj, function(data) {
        console.log(data);
    });
}

The test3.html:

<!DOCTYPE html>
<html>
    <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="The Smashing Pack" />
        <meta property="og:description"            content="A smashing pack full of items!" />
        <meta property="og:image"                  content="http://www.friendsmash.com/images/pack_600.png" />
        <meta property="og:url"                    content="http://www.friendsmash.com/og/smashingpack.html" />
        <meta property="product:price:amount"      content="2.99"/>
        <meta property="product:price:currency"    content="USD"/>
        <meta property="product:price:amount"      content="1.99"/>
        <meta property="product:price:currency"    content="GBP"/>
    </head>
</html>
  • https://developers.facebook.com/tools/debug/ – CBroe Mar 03 '16 at 13:44
  • This question (or one very similar was asked before here: http://stackoverflow.com/questions/27342632/api-error-code-1383146-in-facebook-canvas-api-for-unity-while-making-payment/38485474 – Mattijs van Delden Jul 20 '16 at 16:11

0 Answers0