Skip to content

Get User Objects

Prerequisite

Get Current User

It is not possible to obtain the instance of a current user object, but SDK provides methods to read and update user properties via GetSocial.User class.

More information:

Get a Public User Profile

On Unity public user profile is represented by PublicUser class. Object is read-only and provide access to name, avatar url, list of identities and public properties.

The easiest way to get instance of PublicUser is by GetSocial User Id:

1
2
3
4
5
6
GetSocial.GetUserById("GetSocial User Id", publicUser => {
    // process user data
},
error => {
    // Ooops. There was some error while getting other user details.
});

There are also couple of another methods to get users:

Next Steps

Give us your feedback! Was this article helpful?

😀 🙁