Has anybody created facebook app with database?

0 favourites
  • 4 posts
From the Asset Store
[C2] [C3] support C3 build service | support Banner ads, Interstitial ads, Rewared video ads.
  • 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.

    <img src="smileys/smiley20.gif" border="0" align="middle" />

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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 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.


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