Candy Smith
HomeGeneral Info
General Info
General Info
  • How to open the project
  • How to add more than 100 levels on the map (tutorial)
  • How to edit map and add new levels to the map
  • How to reskin
  • How to change audio
  • How to change the fonts
  • How to test on devices
  • Google Mobile ads integration
  • Unity Ads Integration Guide
  • Unity In-apps Integration Guide
  • How to build
  • Difference between Sweet Candy Sugar and Jelly Garden Match 3
  • How to setup FaceBook and Leadboard
  • Localization
    • Localization details
    • Font setup
  • Sprite atlas and editor. Editor artifacts
  • Add rewarded ads button
Powered by GitBook
On this page
  • Facebook Integration
  • Troubleshooting

How to setup FaceBook and Leadboard

Last updated 1 year ago

Facebook Integration

  1. Download

  2. Import facebook-unity-sdk-xxx.unitypackage the file

  3. Open downloaded package

  4. Click Import

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

  6. Select Gaming app type and enter the app name

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

  8. Now we got App ID. Lets put App ID and App name into Unity. Go to menu Facebook->Edit settings

  9. 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. Go to Dashboard, and setup the Facebook Login

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

  3. Keep it by default like this

  4. Don’t forget to Save all Changes

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

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

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

f) Click Save

  1. Then complete App Verification and Submit for Review.

Leadboard, friends and player cloud store setup

Troubleshooting

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

  2. Android building problem Try this Android Resolver

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

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

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

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

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

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

How to fill Privacy policy -

Generate the key-hash for Android.

Adding User friends permission. Before sending a requiest test Facebook login on the android device. In case of issues check the For proper work of the leadboards you should have all these permissions 1)Go to the Permissions and features 2)Find the user_friends permission and press “Request” and “Continue” d) Fill the form and provide verification details In the “Tell us Fill the text area with the next text:

e) Upload the video, we prepared file for you

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

Main reason of the review rejection. Generate theIf it doesn’t help try to: create test app in the Facebook account, use new Facebook ID in Unity, Launch the game on android device, Get the error about the wrong key hash Then put this new key hash into Facebook settings

"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

Keytool not found.

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

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

GUIDE
More info
Download video
how to setup PlayFab
package
How to fix
Unity 5.5 patches
http://answers.unity3d.com/questions/1252223/unity-55-and-facebook-sdk-not-working-well-togethe.html
http://schemas.android.com/tools
Video tutorial and Unity test
Facebook SDK
https://developers.facebook.com/apps/
Troubleshooting
key-hash