0

I am trying to add a subscription popup on my facebook app, but I get an error about the alternate_price not being set right (even though the parameter is mentioned to be optional. I even tried with the parameter removed, or set to 0, and no luck).

The error that I get is the following, but I dont understand why:

    An error occurred. Please try again later.
    API Error Code: 1383051
    API Error Description: Can't parse open graph object. 
[OGPropertySelectorInvalidException] The given selector string "alternate_price" is invalid for Ent with ID 791929967540538.

I have this code on the main page:

<a href="#" onclick="completePayment()"> 
    <img src="https://www.**********.com/subscribe.png" alt="Subscribe" title="Subscribe" style="vertical-align: top"/>
    <script src="https://connect.facebook.net/en_US/all.js"></script>
    <script type="text/javascript">
     FB.init({
      appId:'2***********6',
      cookie:true,
      status:true,
      xfbml:true
     });
      function completePayment(){
         var obj = {
        method: 'pay',
        action: 'create_subscription',
        product: 'https://apps.facebook.com/******/?product=1'
     };
    FB.ui(obj);
    }
    </script>
    </a>

This is the HTML code from the 'https://apps.facebook.com/******/?product=1' page:

<html>
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# fbpayment: http://ogp.me/ns/fb/fbpayment#">        
    <meta property="og:title" content="********* Subscription" />
    <meta property="og:image" content="https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png" />
    <meta property="og:description" content="****** Subscription" />
    <meta property="fbpayment:price" content="5.00 USD" />
    <meta property="fbpayment:alternate_price" content="3.49 EUR" />
    <meta property="fbpayment:alternate_price" content="3.49 GBP" />
    <meta property="fbpayment:trial_duration" content="7 days" />
    <meta property="fbpayment:billing_period" content="1 week" />
    <meta property="fb:app_id" content="2*************6" />
    <meta property="og:url" content="https://apps.facebook.com/*******/?product=1" />
    <meta property="og:type" content="fbpayment:subscription" />
</html>
2
  • That are not the OG-tags on that url. apps.facebook.com******/?product=1 is a facebook page that will iframe your page. You need to set the url to your page directly
    – WizKid
    Dec 11, 2014 at 17:32
  • So I've changed the URL like you asked. It is now pointing to mydomain.com/_product.php But the problem is that if I change the og:title or the price, the data does not reflect in the facebook subscribe page. I even tried to have empty content in the destination URL (mydomain.com/_product.php) and it still shows the 5.00 USD and the previous title. Any idea what might be wrong?
    – NVG
    Dec 13, 2014 at 9:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.