Search code examples
facebookfacebook-appspayment

Facebook payments breaking changes: problems with products


I'm trying to implement new fb payments on my web game (with old payment API all is fine). I started from simple example in FB Docs with client side like in javascript example here (with my APP_ID and PRODUCT_URL) and with server side like callback URL example here (with my app_secret). I've created a simple product:

 <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="Tiny Coins" />
       <meta property="og:plural_title"           content="Tiny Coins" />
       <meta property="og:image"                  content="http://...(my_domain).../tiny_coins.jpeg" />
       <meta property="og:description"            content="Buy Tiny Coins pack for super price - only 2 USD!" />
       <meta property="og:url"                    content="http://...(my_domain).../TinyBuxes.html" />
    </head> 
</html>

And it worked, i saw pay dialog with right description, title and price. But when i've tried to create few other products and changed PRODUCT_URL to this new url, i got an error in pay dialog "Sorry, but we're having trouble processing your payment. You have not been charged for this transaction. Please try again." with this new products.But when i put previous url back in PRODUCT_URL, all works fine. Almost fine. Becouse pay dialog description and title stucks in their previous values. They don't change when i'm changing the title and description in TinyBuxes.html and when i'm rewriting this values in my URL Callback script. Furthermore, even if i make my URL Callback returning an empty response, pay dialog content doesn't change. Maybe, it is somehow related with cashing info about product directly on Facebook? Hope for help. Thanks.


Solution

  • Well, I found way to solve this problem. In Facebook Docs 2.Defining Products in bottom of the page there are few words about cahsing info about product on facebook and its refreshing after 1 week automatically. Also there is a manual way to refresh this info. You should use Object Debugger, put there PRODUCT_URL , and ta-da...product info will be refreshed.