Skip to content

Get User Info

Koretsky Konstantin edited this page Sep 30, 2020 · 1 revision

Represents a current logged FbUser. Contains parsed user fields from a Facebook API response, and additional methods to retrieve mode data based on current model state like for example generate user avatar url, etc.

Fb.GetLoggedInUserInfo((result) => {
    if (result.IsSucceeded) {
        Debug.Log("result.User.Id: " + result.User.Id);
        Debug.Log("result.User.Name: " + result.User.Name);
        Debug.Log("result.User.FirstName: " + result.User.FirstName);
        Debug.Log("result.User.LastName: " + result.User.LastName);
        Debug.Log("result.User.Location: " + result.User.Location);
        Debug.Log("result.User.PictureUrl: " + result.User.PictureUrl);
        Debug.Log("result.User.ProfileUrl: " + result.User.ProfileUrl);
        Debug.Log("result.User.AgeRange: " + result.User.AgeRange);
        Debug.Log("result.User.Birthday: " + result.User.Birthday);
        Debug.Log("result.User.Gender: " + result.User.Gender);
        Debug.Log("result.User.AgeRange: " + result.User.AgeRange);
        Debug.Log("result.RawResult: " + result.RawResult);
     }
     else {
         Debug.Log("Failed to load user Info: " + result.Error);
     }
});
Clone this wiki locally