Ejemplo n.º 1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="obj"></param>
    private void NormalLogInActivitySubFunction(GetUserDataResult obj)
    {
        if (obj.Data.ContainsKey("FB ID"))
        {
            Debug.Log("123 FB ID");
            if (obj.Data["FB ID"].Value == fbId)
            {
                PlayfabPlayerProfile.SetAvatarURL(fbAvatarURL);

                PlayfabConstants.Instance.FacebookToken = fbToken;
            }
        }

        OnLogInWithFaceBookEvent?.Invoke();
    }
Ejemplo n.º 2
0
    /// <summary>
    ///
    /// </summary>
    public void FirstTimeLogInActivity()
    {
        PlayfabConstants.Instance.FacebookToken = fbToken;

        PlayfabPlayerProfile.SetPlayerName(fbName);

        PlayfabPlayerProfile.SetAvatarURL(fbAvatarURL);

        fbDataDic["SignUPRewardGiven"] = "1";

        PlayfabPlayerProfile.SetPlayerData(fbDataDic, () =>
        {
            if (CoinSystem.instance != null)
            {
                CoinSystem.instance.AddCoins(5000);
            }
        });

        HazariPlayfabAuthentication.Instance.UnlinkCustomID();
        Debug.Log("123 FirstTimeLogIn");
        OnLogInWithFaceBookEvent?.Invoke();
    }