Facebook in app purchasing, need one small piece

0 favourites
  • 12 posts
From the Asset Store
80 pieces of loopable game music, 10 game overs and 10 level complete pieces.
  • Hi guys and gals. I've got facebook inapp purchasing to work for my game by using the direct_URL method. See below:

    https://www.facebook.com/dialog/pay?app_id=292270917524005&redirect_uri=http://lockegames.com/relicsofyore/?purchase=gems&amount=100&action=buy_item&order_info={"item_id":"1a"}&dev_purchase_params={"oscif":true}

    The problem I'm having is very simple now that I've got the rest figured out. How can I use quotes in the address bar? If I change the quotes above the link no longer works. I'm sure there must be a way and it's so silly that this is now the only thing holding up my in app purchasing. :( How do I add quotes to the address bar in the browser url feature?

  • Well that was easy, just had to use "" in place of the ". That was way to easy.

  • Ashley

    Using directurl it appears to be very simple to add in app purchasing with the browser plugin and the sample callback.php on developer.facebook.com. Only thing that seems to need javascript is the call to fetch currency info. Is it possible to go check out the docs and maybe add the couple of needed calls for the local currency rates? Or maybe someone else can take a crack at it? The sdk keeps overwhelming me every time I try and create a plugin.

    I uploaded the callback and have a button that changes the URL to the above using the browser plugin. Then when the game starts it checks the URL for the necessary parameters and updates the database accordingly with the queryparam browser feature. It appears simple, just missing the above. :(

  • Lanceal,

    Perhaps you should write a tutorial on your successful implementation.

  • The important section is expanded:

    <img src="https://dl.dropbox.com/u/77974757/important.PNG" border="0" />

    The rest was just a matter of following the facebook developer doc's at developer.facebook.com

  • I'm interesed to know about how you did implement facebook in app purchase, no one made it using C2.

  • Apparently after scouring through the docs I stumbled upon the fact that you can direct URL all the Facebook dialogues including the pay. After that it was just a matter of using the browser plugin to redirect to pay and back to the app again which transmits the purchaseid through the address bar. So a simple check at startup tells me if there has been a purchase so I can save the purchaseid and info to MySQL. Joannesalfa

  • Ill pop on chat in here in a minute to see if your on. The chat here still works right?

  • Ill pop on chat in here in a minute to see if your on. The chat here still works right?

    The chat isn't great for communication here, sometimes PM works pretty well, there a chat link is http://widget01.mibbit.com/?settings=&server=irc.esper.net&channel=%23construct&noServerMotd=true

  • If someone wants to help me get an upgrade to business license I'd be more then happy to upload my main app and php file for example and write a tutorial?

    Probably won't be any takers but its worth a shot at least. :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No takers? :( alright it was worth a shot. Ill be putting up the tutorial later today or tomorrow. So keep an eye out. Ill be uploading my capx as an example too.

  • Tutorial is up. I'll strip down my capx and add it later. It has other features not particular to this like server side login and fetching a user token. So I need to strip that stuff out.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)