CheckLogin [MSDK Only]
[MSDK Only] Checks whether the MSDK account is generated. If yes, login result returns. If no, returns is null.
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS platform.Supports
Android, iOS platform.Function Definition
- Unity
- Unreal Engine
void CheckLogin(string channel, string permissions = "", string subChannel = "", string extraJson = "");
static void CheckLogin(const std::string &channel, const std::string &permissions = "", const std::string &sub_channel = "", const std::string &extra_json = "");
Input Parameters
- Unity
- Unreal Engine
| Parameter | Type | Description |
|---|---|---|
| channel | string | Channel name For example, "Facebook" or "Twitter". |
| permissions | string | The list of authorized permissions Separate the permissions by commas. For example, "user_info,inapp_friends". The extended field. For more information, see relative channel descriptions. |
| subChannel | string | Sub-channel name |
| extraJson | string | The extended field. For more information, see relative channel descriptions. |
| Parameter | Type | Description |
|---|---|---|
| channel | std::string | Channel name For example, "Facebook" or "Twitter". |
| permissions | std::string | The list of authorized permissions Separate the permissions by commas. For example, "user_info,inapp_friends". The extended field. For more information, see relative channel descriptions. |
| sub_channel | std::string | Sub-channel name |
| extra_json | std::string | The extended field. For more information, see relative channel descriptions. |
Callback Processing
The callback processing API is GUALoginResultObservers. The callback data structure is GUALoginResult.
- Unity
- Unreal Engine
The callback event is LoginResultEvents.
The callback methodID is GUA_ACCOUNT_CHECK_AND_LOGIN.
The callback event is OnLoginResultNotify.
The callback methodID is kMethodIDAccountCheckAndLogin.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().CheckLogin("WeChat");
GUA_NAMESPACE::GUAAccountService::CheckLogin("WeChat");