Associate with a Specified Channel [MSDK Only]
[MSDK only] Associate the account with the specified channel. Currently, only the Kwai channel is supported.
Supported platforms
- Unity
- Unreal Engine
Supports
Android, iOS platform.Supports
Android, iOS platform.Function Definition
- Unity
- Unreal Engine
void Connect(string channel, string permissions = "", string subChannel = "", string extraJson = "{}");
static void Connect(const std::string &channel, const std::string &permissions = "", const std::string &sub_channel = "", const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| channel | string | Associated Channel Information Currently, only the Kwai channel is supported |
| permissions | string | List of authorized permissions, separated by commas For example: user_info,inapp_friends See the corresponding channel documentation for specific meanings |
| subChannel | string | Sub-channel name |
| extraJson | string | Extended Fields For more information, refer to the corresponding channel documentation. |
| Parameters | Type | Description |
|---|---|---|
| channel | std::string | Associated Channel Information Currently, only the Kwai channel is supported |
| permissions | std::string | List of authorized permissions, separated by commas For example: user_info,inapp_friends See the corresponding channel documentation for specific meanings |
| sub_channel | std::string | Sub-channel name |
| extra_json | std::string | Extended Fields For more information, refer to the corresponding channel documentation. |
Callback Handling
The callback processing interface is GUAConnectResultObservers.The callback data structure is GUALoginResult.
- Unity
- Unreal Engine
The callback event is ConnectRetEvents. The callback ID is GUA_ACCOUNT_CONNECT.
The callback event is OnConnectResultNotify. The callback ID is kMethodIDAccountConnect.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().Connect("Kwai");
GUA_NAMESPACE::GUAAccountService::Connect("Kwai");