Has anybody created facebook app with database?

Get help using Construct 2

Post » Sun Jun 02, 2013 4:27 am

Hi again pals,

By any chance have any of you guys created a Facebook App and used AJAX Post to URL to save data? I made my game and put it on Facebook but the AJAX Post to URL is not working, everything seems to be fine, I'm able to get the Facebook user Name and ID but the only thing missing in the array of data is the score that I'm sending to the PHP file.

I have checked everywhere and everything seems to be fine so I thought it would be better to ask you if any of you have ever had a problem with Facebook and to enter data to DB tables through the AJAX Object.

Thanks once again for your patience and help.

frankencost2013-06-02 04:29:01
B
5
Posts: 23
Reputation: 821

Post » Sun Jun 02, 2013 4:58 am

Are you using the default plugin for facebook(you didn't install a third party plugin) if so then you should have access to user scores if you included your app secret and in the app settings you set the app up under the games category. Either of those not being true would keep the scores from working.
www.h1k3.tech

We are here for you!
B
76
S
22
G
15
Posts: 708
Reputation: 15,958

Post » Sun Jun 02, 2013 5:13 am

Hi again lanceal,

No, I'm using the php SDK and some of the JS SDK for login stuff and permissions, when the player misses 3 shots and sending the score variable to a .php file which pass the score and the FB User ID and Name to an insert php file and then the data is entered to the database which I use later on to include a leaderboard.

In the past I used to do the same with Flash (I programmed AS3 for about 3 years) but you know that html5 is the hot stuff now so I felt in love with C2 almost immediately, hence the reason why I'm new to the use of the Ajax within C2.

I'll check if something related to the Godaddy hosting could be causing the issue,or as you said earlier something with the Facebook way to transmit data between http and https. Thanks my friend!
B
5
Posts: 23
Reputation: 821

Post » Mon Jun 03, 2013 4:29 am

Hi lanceal,

I made it my friend, the solution was as simple as to use only the name of the file I was going to send the score to (instead of http://www.mysite.com/game/test.php I used text.php onlye making sure that the file was going to be in the same directory, now it works.

Thanks!

B
5
Posts: 23
Reputation: 821


Return to How do I....?

Who is online

Users browsing this forum: Alex Bryant, Congrats2u, RogerThompson, waguilar and 9 guests