Golang Get User From FB Id

Hi,
Looks like there is no way from go to get user account from a facebook id

UsersGetId is filling facebook id with nil

    users, err := GetUsers(ctx, n.logger, n.db, n.tracker, userIDs, nil, nil)
    if err != nil {
        return nil, err
    }

Is there any way to easily get an account given a facebook id?

Thanks

@cloudAle What version of Nakama server are you on? We recently resolved an issue where the Facebook ID field was not populated into the responses returned by the server framework.

@novabyte Nakama 2.15

But even on nakama 3.0 nakama/runtime_go_nakama.go at 3b4522e086a59d9b3f6ff6bd8bcbc0be71ff7472 · heroiclabs/nakama · GitHub
it is passing fbIDs as nil

What I meant was we’re querying by passing a fb id, and then getting back the user account, seems like golang api is missing this functionalities, as it could be easily done on c# unity with

client.GetUsersAsync(session, null, null, new string[]{ fbId });

@cloudAle I think there’s some confusion. You cannot pass FB IDs into the user ID field in the GetUsers function right now because there’s no additional input exposed to the server framework. I think this is a simple case where it could be useful to extend the server framework to match the API supported by the server.

Please open a feature request for the change.

1 Like