How to make a Facebook game




56,826 visits, 229,619 views



This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.


If you have the user logged in with scores permission, you can use the scores actions. These can take several seconds to complete, so as with logging in, these work by using an action to make a request (like "publish score") which later triggers an event (like "On score submitted") when the action has completed.

Note that hi-score tables only show scores for the current user and their friends. You can't see all player's scores. This is how the Facebook Scores system works.

Also note that it is almost impossible to have a secure scores system in a javascript game. Hackers may be able to post fake scores. However, it shouldn't be important - scores are just a bit of fun, and fake scores can only be seen by that user and their friends, not everyone. So please don't worry too much about the security of hi-scores.

Not working?

At time of writing the Facebook platform is a little unreliable. The Facebook team appear to be constantly working on it, which means sometimes features are temporarily broken or unavailable. If you have problems, try again the next day.

You can also try changing some of the Advanced settings (with Basic settings open, click the Advanced link on the left menu). For example you can use Sandbox mode if you just want to test if the app is working for you, enable Sandbox mode. That makes the app visible only to you (and anyone else you've added as an app admin). Remember to disable it if you want your app to be public!

If all else fails and you can't get it working, go to Account Settings - Apps and remove your app. Wait 5 minutes, then go back to your app. It should ask you to log in again.

Wrapping up

Last but not least, the Facebook plugin works on your own website as well! If the user visits your game's URL directly - outside of Facebook - they can still log in! That means you can still have users visiting your website directly logging in with Facebook, posting scores and so on. Very handy!

Now you can get publishing your games as Facebook apps, and enabling Facebook integration on your website too. Let us know how it goes, and be sure to post to the forum if you have any questions!


  • Order by
Want to leave a comment? Login or Register an account!
  • hi!

    Is there a plugin , same as instant games in c3 , for construct2 , to make games for facebook instant games?