Facebook in app purchasing, need one small piece

Get help using Construct 2

Post » Thu Nov 22, 2012 1:21 pm

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?lanceal2012-11-23 01:54:25
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Thu Nov 22, 2012 1:33 pm

Well that was easy, just had to use "" in place of the ". That was way to easy.
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Nov 23, 2012 12:08 am

@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. :(
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Nov 23, 2012 5:30 am

Lanceal,

Perhaps you should write a tutorial on your successful implementation.
B
20
S
4
G
2
Posts: 124
Reputation: 2,482

Post » Fri Nov 23, 2012 6:02 am

The important section is expanded:


The rest was just a matter of following the facebook developer doc's at developer.facebook.com
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Nov 23, 2012 6:20 am

@lanceal

I'm interesed to know about how you did implement facebook in app purchase, no one made it using C2.
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Fri Nov 23, 2012 6:49 am

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
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Nov 23, 2012 6:58 am

Ill pop on chat in here in a minute to see if your on. The chat here still works right?
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Post » Fri Nov 23, 2012 7:40 am

[QUOTE=lanceal] Ill pop on chat in here in a minute to see if your on. The chat here still works right?[/QUOTE]

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
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Fri Nov 23, 2012 8:25 am

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. :)lanceal2012-11-23 08:28:22
B
68
S
21
G
15
Posts: 701
Reputation: 15,604

Next

Return to How do I....?

Who is online

Users browsing this forum: Colorfish, Waltuo and 4 guests