IEnumerator CreateCommunityProfile()
    {
        yield return(StartCoroutine(DownloadImage(fb_avatar_link)));

        CommunityUserData user = new CommunityUserData("FB" + AccessToken.CurrentAccessToken.UserId, fb_name, fb_avatar_name);

        user.WriteToCache();
        SceneManager.LoadScene("Community");
    }
    private async void GetCommunityProfile(AccessToken token)
    {
        string json = await FirebaseHelper.DownloadString($"CommunityUserData/FB{token.UserId}.json");

        if (string.IsNullOrEmpty(json))  // => new user
        {
            Debug.Log("Creating new profile");
            FB.API("me?fields=name,picture", HttpMethod.GET, FBGetProfile);
            return;
        }

        CommunityUserData.WriteToCache(json);
        SceneManager.LoadScene("Community");
    }
 private void UpdateCommunityUserData()
 {
     user.WriteToCache();
     user.WriteToServer();
 }