How to setup FaceBook and Leadboard

Facebook Integration

Video tutorial and Unity test

  1. Download Facebook SDK

  2. Open downloaded package

  3. Click Import

  4. Create your app in Facebook developer account Add a New App

  5. Select Gaming app type and enter the app name

  6. Select Settings->Basic and select category Games and Sub-category and Save changes

  7. Put your App ID and App name into setting in Inspector

Make sure you have no spaces!

  1. Regenerate android manifest

  2. Click Settings and + Add Platform

  3. Select your platform. Note: This asset adjusted for mobile platforms, to use Facebook canvas you should make changes like landscape view and Facebook monetization.

  4. For Android: Set your package name Set class name: com.facebook.unity.FBUnityDeepLinkingActivity Enable Single Sign On Enable Deep Linking

  5. For iOS: For Bundle ID use Apple ID from the Appstore connect For iPhone and iPad store ID use your package name Enable Single Sign On Enable Deep Linking

  6. Put Key Hashes from Unity Facebook Settings

  1. Save changes

  1. In Settings -> Advanced set is as Native app.

  1. Make it public to make it works.

  1. How to fill Privacy policy - GUIDE

  2. Go to Dashboard, and setup the Facebook Login

  3. Select a platform and go to the settings of the Facebook login

  4. Keep it by default like this

  5. Don’t forget to Save all Changes

  6. Go to the Dashboard, find the App Center and click “Set up”

  7. Fill the screenshots and the description of your game. This information will represent your game in Facebook.

  8. Generate the key-hash for Android. More info

1. Open the game

2. Click Play

3. On the map click to the Facebook icon and login

4. Click on the level on the map to see leadboard of you and your friends if they pass a level

e) Upload the video, we prepared file for you Download video

f) Click Save

  1. Then complete App Verification and Submit for Review.

Leadboard, friends and player cloud store setup

Next service provide leadboard, friends on map, player data cloud store, just choose one: how to setup PlayFab (Paid service)


  1. The error on the device: “Invalid key hash”. Put the key hash from the error to your Facebook settings.

  2. "Assets\GameSparks\GameSparksSettings.cs(6,16): error CS1029: #error: 'The GameSparks SDK only supports "Scripting Runtime Version.NET 3.5 Equivalent" and Api compatibility level 2.0'" - the error related to latest gamesparks To solve please import this package

  3. Android building problem Try this Android Resolver

  4. Keytool not found. How to fix

  5. Release 7.12.1 has problem on iOS, recommend to use 7.12.0 instead

  6. Don’t try to use fake accounts to test, use test spectial test account inside of the game

  7. NullReferenceException: Object reference not set to an instance of an object; GameSparks.Platforms.PlatformBase.Start () (at Assets/GameSparks/Platforms/PlatformBase.cs:209) Gamesparks from 5.5.6 require to add GameSparksUnity component to the NetworkManager object in the map or game scene depending from the game

  8. error CS1704: An assembly with the same name `Facebook.Unity.Settings' has already been imported. Solution: delete Facebook.Unity.Settings.dll file from <Your Project>/Library/FacebookSDK/ and restart Unity

  9. IOS building error: FBSDKShareKit/FBSDKShareKit.h file not found Solution: Check path to facebook sdk plugin. Like this

  10. Unity 5.5 and Facebook SDK not working well together in iOS Try to use latest Unity patch Unity 5.5 patches they should fix it someday. Or read this

  11. If you still can’t see the leaboard try to delete game from Gamesparks account and create in again from the Unity.

Open AndroidManifest file from Assets/Plugins/Android and add next line xmlns:tools="" there

Last updated