Check Whether Binding Is Allowed [MSDK Only]
[MSD Only] Check whether the account can be bound. If binding is allowed, a ConfirmCode will be returned. After the game retrieves the user information, the BindWithConfirmCode operation can be performed.
Supported platforms
- Unity
- Unreal Engine
Supports
Android, iOS platform.Supports
Android, iOS platform.Function Definition
- Unity
- Unreal Engine
void Check(string channel, string permissions = "", string subChannel = "", string extraJson = "");
static void Check(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 | Channel name For example "Facebook", "Twitter" |
| 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 | Channel name For example "Facebook", "Twitter" |
| 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 handling interface is GUALoginResultObservers.The callback data structure is GUALoginResult.
- Unity
- Unreal Engine
The callback event is LoginResultEvents. The callback ID is GUA_ACCOUNT_BIND.
The callback event is OnLoginResultNotify. The callback ID is kMethodIDAccountCheck.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().Check("WeChat");
GUA_NAMESPACE::GUAAccountService::Check("WeChat");