
You must have a PHP configured server to practice this tutorial. I will be writing a backend web-service for the leaderboard, a part of its job will be handling the requests from Unity and responding accordingly. I will then use FTP to upload the backend web-service script to my Server, and then through phpMyAdmin, I will set up the database schema to store user’s Facebook IDs and their highest scores.
Previously I worked on writing backend web services for a global leaderboard. Global leaderboards are not good at keeping user retention high as they can be little discouraging for new comers to games. If you’re interested in implementing Facebook weekly leaderboard in your game and wonder how big games like Candy crush saga do it, then you should watch this video as I will be giving tips on how to develop Facebook leaderboard and reset stats in the beginning of every week for weekly completions.
This video is the simplest of all tutorials as it does not involve scripting. It is about the integration of Facebook SDK in Unity project. Facebook SDK integration can be full of hassle sometimes as it requires OpenSSL to be configured prior to the integration. I’ve simplified all of the process for Facebook Integration.
The tutorial can be broken down into following parts
Configuring OpenSSL on Windows OS
Integration of Facebook SDK into Unity Project
Setting up App on Facebook Developer Console for Unity Game
Integrating the Facebook Manager Script and enabling Facebook login
Facebook has recently made a few changes to how its permissions work. To my understanding; Facebook is now asking for the verification of developer either by a passport or by Government issued photo ID in order to grant the developer with email permission. I figured we could work without requesting user’s email from Facebook as it is not an important piece of information needed for constructing Facebook leaderboards in Games.
It’s time to make Unity communicate with PHP configured server. I will demonstrate how to send requests to server and how to handle responses in Unity through the Server Manager script.
In this part of the video I will finally demonstrate how to program a dynamic Facebook leaderboard and how everything puts into perspective.
This video mainly consists of following parts
Setting up Prefabs in UI for the Leaderboard
Writing the Leaderboard Manager Script
Querying the Facebook Graph API for User’s pictures
After watching this video, you will have yourself a basic architecture of Unity Facebook Leaderboard to implement in your Games.
This course will enable developers to implement Facebook leaderboard for Unity games published on Play Store and App Store. I will briefly explain Facebook Leaderboard implementation by breaking it down into smaller and comprehensible parts. After the completion, students will have a basic architecture for Facebook leaderboard to begin with and will be able to easily develop Facebook Leaderboard for their Games.