Bind (Bind)
Bind a third-party channel to the guest account.It essentially means multiple third-party accounts share the same Player Network SDK OpenID.
The common usage scenario is: Guest logs into the game and then binds Facebook or Google account.
Function Definition
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool Bind(
const EINTLLoginChannel Channel,
const FString permissions,
const FString extraJson);
Parameter Instructions
| Parameters | Type | Explanation |
|---|---|---|
| Channel | EINTLLoginChannel | Specifies the bound channel. For more information, see EINTLLoginChannel. |
| permissions | string | Authorization permission list during binding, separate multiple permissions with commas For example: user_info,inapp_friends |
| extraJson | string | Extension fields For more information, refer to relative channel description. |
Return Value
Callback ID is kMethodIDAuthLaunchAccountUI.
Callback processing
The callback interface is AuthResultObserver.The callback data structure is AuthResult.
Callback ID is kMethodIDAuthBind.
Bind Third-Party Channel Account
bool support = UINTLSDKAPI::Bind(EINTLLoginChannel::kChannelSteam);
Bind Custom Account (Password Login Binding)
| Parameters | typology | Explanation |
|---|---|---|
| Category | String | Login |
| account | String | Account Supports email and phone |
| accountType | int | Account Type 1: Email Account 2: Phone Account |
| password | String | Password |
| phoneAreaCode | String | Phone area code For example, "86" is China. If registering the account with an email address, this field is empty. |
FString extra_json = "{\"type\":\"login\",\"account\":\"\",\"accountType\":1,\"phoneAreaCode\":\"\",\"password\":\"\"}";
UINTLSDKAPI::Bind(EINTLLoginChannel::kChannelCustomAccount, "", extra_json);
Bind Custom Account (Verification Code Login Binding)
| Parameters | Type | Explanation |
|---|---|---|
| Category | String | loginWithCode |
| account | string | Account Supports email and phone |
| accountType | int | Account Type 1: Email Account 2: Phone Account |
| verifyCode | string | Verification Code |
| phoneAreaCode | string | Phone area code For example, "86" is China. If registering the account with an email address, this field is empty. |
FString extra_json = "{\"type\":\"loginWithCode\",\"account\":\"\",\"accountType\":1,\"verifyCode\":\"\",\"phoneAreaCode\":\"\"}";
UINTLSDKAPI::Bind(EINTLLoginChannel::kChannelCustomAccount, "", extra_json);
Bind Custom Account (Registration)
| Parameters | Type | Description |
|---|---|---|
| Category | string | register |
| account | String | Account Supports email and phone |
| accountType | int | Account Type 1: Email Account 2: Phone Account |
| verifyCode | String | Verification Code |
| password | String | Password |
| phoneAreaCode | String | Phone area code For example, "86" is China. If registering the account with an email address, this field is empty. |
| birthday | String | User's birthday For example, December 31, 1970, enter "1970-12-31". |
| region | string | Numeric codes of countries or regions as per ISO 3166-1 For example, 156 represents China, and 040 represents Austria. |
| isReceiveEmail | int | Receive marketing emails 0: Do not receive marketing emails 1: Receive marketing emails |
| langType | string | Language Type (RFC 4646) For example, "en" represents English.For details, see Language Type Definition. |
| username | String | Username, must start with a letter, containing only lowercase letters (from a to z), underscores (_) and numbers (from 0 to 9).Length can be 6 to 16 letters. |
FString extra_json = "{\"type\":\"register\",\"account\":\"\",\"accountType\":1,\"verifyCode\":\"\",\"password\":\"\",\"phoneAreaCode\":\"\",\"birthday\":\"1970-12-31\",\"region\":\"156\",\"isReceiveEmail\":\"0\",\"langType\":\"en\",\"username\":\"YOUR_USER_NAME\"}";
UINTLSDKAPI::Bind(EINTLLoginChannel::kChannelCustomAccount, "", extra_json);