private void AuthCallback(ILoginResult result) { if (FB.IsLoggedIn) { // AccessToken class will have session details var aToken = Facebook.Unity.AccessToken.CurrentAccessToken; // Print current access token's User ID Debug.Log(aToken.UserId); // Print current access token's granted permissions foreach (string perm in aToken.Permissions) { Debug.Log(perm); } if (!Player.LegacyPlayerData.FreeCoinsFB) { Player.LegacyPlayerData.FreeCoinsFB = true; Player.AddCoins(10, isFree: true); } Application.OpenURL(UtilsHelper.CheckPackageAppIsPresent("com.facebook.katana") ? "fb://page/1489390894492960" : "https://www.facebook.com/transportcapitalist/"); EnableDisableButtons(); } else { Debug.Log("User cancelled login"); } }
private bool CheckInstall() { #if UNITY_EDITOR return(true); #else var isInstall = UtilsHelper.CheckPackageAppIsPresent(zthBundleId); UnityEngine.Debug.Log($"app {zthBundleId} is {isInstall}"); return(isInstall); #endif }