Chat / Unreal
Current version: v3
Chat Unreal v3
Chat Unreal
Chat
Unreal
Home
/
Chat
/
Unreal
/
Users

Retrieve user metadata

You can retrieve user metadata by creating a List of keys to retrieve and passing it as an argument to a parameter in the GetMetaData() method. A std::map<std::wstring, std::wstring> will return key-value items through the handler callback function.

SBDUser* currentUser = SBDMain::GetCurrentUser();

std::vector<std::wstring> keys;
keys.push_back(L"key1");
keys.push_back(L"key2");

currentUser->GetMetaData(keys, [](const std::map<std::wstring, std::wstring>& meta_data, SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }
});