h1k3's Forum Posts

  • 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

  • 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

  • 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. :(

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well that was easy, just had to use "" in place of the ". That was way to easy.

  • 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?

  • Explains the general process steps

    developers.facebook.com/docs/payments/build

    Example callback.php code

    developers.facebook.com/docs/payments/callback

    Implementing the pay dialogue via javascript or direct_url

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

  • Figured it out myself. I had just failed to tokenat the experience max value properly.

  • My capx

    So I have my app setup and Ajax is working flawlessly for this subapp but I can't seem to get the width right on the experience bar. I'm sure I'm just not getting the math right. Can someone take a peek and see what I'm doing wrong with the formula?

    Thank you in advance,

    Lance

  • If you have the ability for php on your server I can help you out with that one. The team at Scirra seem to be more busy with the game related side of the program and after reading I found that we really shouldn't be using the app secret on the javascript side because it can allow others to make unauthorized posts and such from the app. So I've been slowly chipping away at php to integrate it with the javascript offered in Construct2. I just today finished up the ability to generate a new user token using php. This is done using the ajax plugin and browser plugin. It can be done using the construct Facebook plugin but it requires the app secret which Facebook says not to put on the javascript side.

    You will need the browser plugin to pull down the information from the address bar and the ajax plugin to both login to the app server side and request an user token. Visit How to log in to your app server side

    for more info on how to set up your php files. It look overwhelming but it can easily be boiled down to just a few commands to work with the ajax plugin.

    Hope that helps or at least points you in the right direction.

    Lance

    You can visit my app page at lockegames.com/relicsofyore if you want to see it in action. Once you accept the game it will log you in and show you a valid access token on the screen. I'll leave it up so you can see for a day or two while I start plugging away at some other aspects of the app. You will currently need to change the permissions parameter manually if you want to reload and see it work a second time.

    It pulls the code variable down from the address which is used to get an access token, and it can only be used once. So if you leave the permissions set to one in the address bar it won't generate a new code which will kick up an error warning.

  • you need php to utilize facebook credits. It requires a callback php script. I'm working on that myself right now.

  • That is too cute.

  • do you have the links all configured correctly in the basic info? Such as canvas url and such? Could be you copied the appid wrong? Try going directly to the address for your game, if it works there then you probably configured on of the urls wrong.

  • You don't have a secure website(ssl certificate) I have the same problem on the game I'm making(http://lockegames.com/relicsofyore/main) Facebook defaults to requiring secure connections for its users. Users can turn off their secure browsing in settings to view your app or you can just give them the direct link to your app like I did above.

    You can of course buy an ssl certificate for your website. Once I'm ready to go live and market my game I'll be doing just that.

  • This is exactly how my game is designed. I'm so glad that I don't need to invent a way to communicate with my game subapps. TYVM

  • Add an invisible sprite and set the polygon to the whole sprite border. Then just cover all the black parts with the invisible sprite, stretching the sprite as needed. Of course it'll add another sprite instance but thats the only way I can think of.