void APICallback(string response)
 {
     profile = FBUtil.DeserializeJSONProfile(response);
     GameStateManager.Username = profile["first_name"];
     StartCoroutine(
         FBUtil.GetPictureTexture(facebookID : FB.UserId, callback : delegate(Texture t) { GameStateManager.UserTexture = t; })
         );
     friends = FBUtil.DeserializeJSONFriends(response);
 }
Beispiel #2
0
    void HandleUserName(FBResult result)
    {
        if (result.Error != null)
        {
            FB.API(FBUtil.GetPictureURL("me", 128, 128), Facebook.HttpMethod.GET, HandleAvatar);
            return;
        }

        profile = FBUtil.DeserializeJSONProfile(result.Text);
        Text UserMsg = UIFB_UserName.GetComponent <Text>();

        UserMsg.text = "Hallo, " + profile["first_name"];
    }