Combu  3.2.2
Unity API Documentation
Linking external platforms

In this section you will learn how to authenticate and link the local user to an external platform like GameCenter, Facebook etc.


To authenticate the local user with a platform Id you need to call CombuManager.localUser.AuthenticatePlatform. If the platform key+id exists then it will return the registered account, else it will create a new account with username PlatformName_PlatformId (including the underscore symbol).

// After you have logged in with Facebook SDK (
CombuManager.localUser.AuthenticatePlatform("Facebook", FB.UserId, (bool success, string error) => {
if (success)
Debug.Log("Login success: ID " +;
Debug.Log("Login failed: " + error);

Link a platform to the local user

If the local user is already logged, you can link a platform Id to the account with CombuManager.localUser.LinkPlatform:

CombuManager.localUser.LinkPlatform("YourPlatformName", "YourPlatformId", (bool success, string error) => {
if (success)
Debug.Log("Link success");
Debug.Log("Link failed: " + error);

Transfer the external platforms

Sometimes may happen that you need to move the external platforms of the local user to another account, in this case you can use CombuManager.localUser.LinkAccount (the platforms key+id of the local user account will be transferred to the new account, the account and all its data/scores/etc deleted, and the new account will be assigned to the local user):

CombuManager.localUser.LinkAccount("other_username", "other_password", (bool success, string error) => {
if (success)
Debug.Log("Transfer success");
Debug.Log("Transfer failed: " + error);

Load users from platforms

If your users have logged with their platform profile then you can retrieve their Combu profiles later (for example after a call to Facebook API that returns the list of friends to show who is playing your game by matching the existance of a profile in Combu):

// Assign platform and related id to all users that you want to search, for example coming from Facebook friends API
List<string> platforms = new List<string>() { "Facebook", "Facebook" }; // you have passed "Facebook" as platform key to AuthenticatePlatform
List<string> ids = new List<string>() { "000000", "111111" };
User.LoadPlatform(platforms, ids, (User[] users) => {
Debug.Log("Users found: " + users.Length);