Do you think we could implement Facebook credits

0 favourites
  • 11 posts
  • Here is a post on how to implement Facebook credits to your game.

    developers.facebook.com/blog/post/489

    Is there a way to implement this code into Construct 2?

  • You need server side scripting (see step 3: build callback.php) to use credits (and generally any other payment system). This is to keep it secure - it can't all just be done in javascript. However this means you have to do some coding yourself, and right now since we advertise Construct 2 as a non-programming tool, it means a lot of our users don't know how to do this, and it's a bit complicated to instruct beginners on how to set up things like this.

    We've got some ideas to work around this problem though. Hopefully we can come up with something soon.

  • Wow thanks for the quick reply. If there is any feature that I think will attract people is this feature. In game purchases is the way of the future. And if you do this you will be beyond so many other engines.

    Even if you make it so that it is possible to do this in construct 2 in some way shape or form, it would be best to include it. For example if I could add some scripting function to make it possible that would be amazing.

  • Greetings.

    I just tried to navigate the facebook integration of in-app payments and now I need a few tylenol; my head is banging. For myself (and probably a lot of others) doing this type of programming/integration is extremely stressful.

    C2 is a god-send for me, because it doesn't require me to stare at lines of code and deal with API/SDK documentation... all that stuff hurts, seriously.

    I'm 100% serious when I say that some sort of plugin for C2 that handles at least basic functionality with using facebook credits for virtual goods would be most welcome.

    Is there any progress on an official release for this or are there any users of C2 with programming expertise working on / considering working on something like this?

  • Credits and sign up are currently the only thing I have complete on my game. I must say like they've been saying. It's a royal pain to integrate. I ended up going the direct URL route. So I have the browser redirect to the pay dialog then this redirects to a php script that updates the users 'gems' and also add a receipt in the MySQL database for troubleshooting reference. After this it redirects back to the program and shows them a receipt with their Facebook transaction number and my MySQL reference number. If there's a third party plugin out there I'd recommend using it over trying it yourself. If you want to see it in action send me a pm. I cam set you up as a credits tester on my game. lockegames.com/relicsofyore/

  • lanceal, did you give any thought to selling the thing as a plugin? I'm sure there's gotta be a lot of guys like me that just don't have the time, know-how, or energy to try this!

    That's a huge step! Being able to buy virtual currency with credits is really all I want to implement.

    Can you give some ideas of what's needed? I'm assuming you absolutely have to have a website with dedicated server / PHP?

    Also, are you a god? :P

  • Not a god lol. Just super patient. You do need a server with php, yes. As far as a plugin I only needed the browser plugin. Everything else needed to be php. I put my first attempt up in the tutorial section. It works but by no means is a finished product. Even now I need to finish the error handler section in the php code and tell my construct 2 project how to look for the error and handle accordingly. I would be willing to help you set it up for your project but it was a bit time consuming so I would probably ask for a few bucks in return to cover the time spent.

    The info you need is here:

    developers.facebook.com/docs/reference/dialogs/pay

    And here:

    developers.facebook.com/docs/payments/callback

    And here:

    developers.facebook.com/docs/payments/build

    And of course the construct2 manual browser section:

    scirra.com/manual/110/browser

    That's the info I used to implement it. It seems like a lot but it really isn't hard to do if you commit to learning one of those sections at a time. First setup credits for the app, then work on the callback section, the build the pay dialog, then commit to learning the browser plugin reference section, particularly browser.url browser,queryparam, and browser.hash.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dude, I really appreciate the tips and references. You gave me some structure to try and tackle this problem, so mucho gracias.

    I'm gonna give it a shot on my own for now; the lesson tends to stick when you have to struggle through it yourself, ya know? If I still can't wrap my head around it, I may call upon your services.

    Thanks again; your time is appreciated, sir!

  • space Ape

    Anytime :)

  • space Ape,

    As proof of concept I purchased $1 worth of gems from my store a few days ago. So as you can see, it's definitely possible. :)

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

  • Dude, that is really friggin encouraging! One of the major things I was sweating was working through all that garbage only to learn it's unlikely to work anyways.

    You took a load off, buddy. Thank you once again. *bow*

    And when someone asks you if you're a god, you say YES! :)

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