버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTApplication applicationApi;

applicationApi.start(GetSafeHwnd(), [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// If the start is successful
		
		// Check if auto-login is enabled
		KakaoGame::API::KGTPlayer playerApi;
		bool isLoggedIn = playerApi.isLoggedIn();
		
		if (isLoggedIn)
		{
			// Get the current Player ID issued by the platform
			KakaoGame::Data::KGTPlayer player;
			playerApi.getCurrentPlayer(player);
			
			std::wstring playerId = player.playerId; // The current Player ID issued by the platform
			std::wstring accessToken = playerApi.getAccessToken(); // Platform access token (AccessToken)
			
			// [TODO] Move to the game screen
		}
		else
		{
			// [TODO] If auto-login is not enabled, move to the login screen
		}
	}
	else
	{
		// If the start fails - since initialization failed, retry the start or close the app.
		if (KakaoGame::Data::KGTResultCode::NetworkFailure == result.code
			|| KakaoGame::Data::KGTResultCode::ServerTimeout == result.code
			|| KakaoGame::Data::KGTResultCode::ConnectionFailed == result.code)
		{
			// [TODO] If a network error occurs, notify the user that the start failed due to a network issue and retry.
		}
		else
		{
			// [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
		}
	}
});

Setting Up Auto Login

...

Logging In Without Using the Default Login UI

...

Synchronous Example

...

languagecpp

...

in a Windows Environment

This feature is supported in the Windows environment.

If you do not use the default login UI provided by the SDK and instead implement your own login UI, the SDK offers a feature to set up auto login.

  • If you do not configure auto login, the SDK will not create a file for automatic login by default.

  • The file for auto login is created and stored in an encrypted format in the folder ".kakaogames" under the name ".access". This is because multiple users can exist on a single PC."

  • When a game is uninstalled and then reinstalled, if the auto login file remains, the SDK checks whether an encrypted ".access" file exists in the location of the Windows SDK file (KakaoGame.dll). If the file is valid, the SDK loads the file containing the auto login information and performs the auto login.

  • If the auto login files are corrupted, the SDK will delete them.

  • If the auto login file exists and the user logs out or withdraws, the auto login file will be deleted.

코드 블럭
languagecpp
nclude "KakaoGameLib.h"
// Set whether to use auto-login; if not set, it defaults to not using auto-login
// When auto-login is enabled and login is successful, auto-login information is generated
// If auto-login information exists, auto-login will proceed automatically during the next KGTApplication start, so to remove the auto-login information, you need to log out
bool useAutoLogin = true;
KakaoGame::API::KGTApplication applicationApi;

applicationApi.setUseAutoLogin(useAutoLogin);

Login

...

발췌문 삽입
Login SDK Example
Login SDK Example
namelogin
nopaneltrue

Logging In Without Using the Default Login UI

발췌문 삽입
Login SDK Example
Login SDK Example
namelogin_custom
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Setting the idpCode for login
KakaoGame::Data::KGTIdpCode idpCode = KakaoGame::Data::KGTIdpCode::Kakao;

KakaoGame::Data::KGTResult result;
KakaoGame::API::KGTPlayer playerApi;

playerApi.login(GetSafeHwnd(), idpCode, result);

if (result.isSuccess())
{
	// IDP login and platform login successful
	KakaoGame::Data::KGTPlayer player;
	KakaoGame::API::KGTPlayer playerApi;
	
	playerApi.getCurrentPlayer(player);
	
	std::wstring playerId = player.playerId; // Current Player ID issued by the platform
	std::wstring accessToken = playerApi.getAccessToken(); // Platform access token (AccessToken)
	
	// [TODO] Since the login was successful, proceed to the game screen.
}
else
{
	// IDP login or platform login failed
	// [TODO] If login fails, inform the user and prompt them to retry.
	if (KakaoGame::Data::KGTResultCode::NetworkFailure == result.code
		|| KakaoGame::Data::KGTResultCode::ServerTimeout == result.code
		|| KakaoGame::Data::KGTResultCode::ConnectionFailed == result.code)
	{
		// [TODO] If a network error occurs, notify the user that the start failed due to a network issue and retry.
	}
	else if (KakaoGame::Data::KGTResultCode::Forbidden == result.code)
	{
		// [TODO] During the CBT period, authentication may not be possible for users who are not allowed. Provide an appropriate notification to the user.
	}
	else if (KakaoGame::Data::KGTResultCode::UserCanceled == result.code)
	{
		// [TODO] Since the user canceled during the login process, the login screen should be maintained.
	}
	else
	{
		// [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
	}
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Set the idpCode you want to log in with
KakaoGame::Data::KGTIdpCode idpCode = KakaoGame::Data::KGTIdpCode::Kakao;

KakaoGame::API::KGTPlayer playerApi;

playerApi.login(GetSafeHwnd(), idpCode, [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// Successfully logged in with IDP and platform
		KakaoGame::Data::KGTPlayer player;
		KakaoGame::API::KGTPlayer playerApi;
		
		playerApi.getCurrentPlayer(player);
		
		std::wstring playerId = player.playerId; // The current Player ID issued by the platform
		std::wstring accessToken = playerApi.getAccessToken(); // Platform access token (AccessToken)
		
		// [TODO] Since the login was successful, proceed to the game screen.
	}
	else
	{
		// IDP login or platform login failed
		// [TODO] If login fails, inform the user and prompt them to retry.
		if (KakaoGame::Data::KGTResultCode::NetworkFailure == result.code
			|| KakaoGame::Data::KGTResultCode::ServerTimeout == result.code
			|| KakaoGame::Data::KGTResultCode::ConnectionFailed == result.code)
		{
			// [TODO] If a network error occurs, notify the user that the start failed due to a network issue and retry.
		}
		else if (KakaoGame::Data::KGTResultCode::Forbidden == result.code)
		{
			// [TODO] If the user is not allowed during the CBT period, authentication may not be possible. Provide a notification message to the user.
		}
		else if (KakaoGame::Data::KGTResultCode::UserCanceled == result.code)
		{
			// [TODO] Since the user canceled during the login process, the login screen should be maintained.
		}
		else
		{
			// [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
		}
	}
});

Logging in Using a Square Token

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// User ID requesting login
std::wstring playerId;

// Token received from Square
std::wstring squareToken;

KakaoGame::Data::KGTResult result;
KakaoGame::API::KGTPlayer playerApi;

playerApi.loginIdpWithSquareToken(GetSafeHwnd(), playerId, squareToken, result);

if (result.isSuccess())
{
	// Successful IDP and platform login
	KakaoGame::Data::KGTPlayer player;
	KakaoGame::API::KGTPlayer playerApi;
	
	playerApi.getCurrentPlayer(player);
	
	std::wstring playerId = player.playerId; // Current Player ID issued by the platform
	std::wstring accessToken = playerApi.getAccessToken(); // Platform access token (AccessToken)
	
	// [TODO] Since login was successful, proceed to the game screen.
}
else
{
	// IDP or platform login failed
	// [TODO] If login fails, notify the user and request a retry.
	if (KakaoGame::Data::KGTResultCode::NetworkFailure == result.code
		|| KakaoGame::Data::KGTResultCode::ServerTimeout == result.code
		|| KakaoGame::Data::KGTResultCode::ConnectionFailed == result.code)
	{
		// [TODO] If a network error occurs, notify the user that the start failed due to a network issue and retry.
	}
	else
	{
		// [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
	}
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// User ID requesting login
std::wstring playerId;

// Token received from Square
std::wstring squareToken;

KakaoGame::API::KGTPlayer playerApi;

playerApi.login(GetSafeHwnd(), playerId, squareToken, [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// IDP login and platform login successful
		KakaoGame::Data::KGTPlayer player;
		KakaoGame::API::KGTPlayer playerApi;
		
		playerApi.getCurrentPlayer(player);
		
		std::wstring playerId = player.playerId; // The current Player's ID issued by the platform
		std::wstring accessToken = playerApi.getAccessToken(); // Platform access token (AccessToken)
		
		// [TODO] Since login was successful, proceed to the game screen.
	}
	else
	{
		// IDP login or platform login failed
		// [TODO] If login fails, notify the user and request a retry.
		if (KakaoGame::Data::KGTResultCode::NetworkFailure == result.code
			|| KakaoGame::Data::KGTResultCode::ServerTimeout == result.code
			|| KakaoGame::Data::KGTResultCode::ConnectionFailed == result.code)
		{
			// [TODO] If a network error occurs, notify the user that the start failed due to a network issue and retry..
		}
		else
		{
			// [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
		}
	}
});

Logout

...

발췌문 삽입
Logout SDK Example
Logout SDK Example
namelogout
nopaneltrue

Logging Out Without Using the Default Logout UI

발췌문 삽입
Logout SDK Example
Logout SDK Example
namelogout_custom
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::Data::KGTResult result;
KakaoGame::API::KGTPlayer playerApi;

playerApi.logout(GetSafeHwnd(), false, result);

if (result.isSuccess())
{
	// Logout successful
	
	// [TODO] Return to the start screen
}
else
{
	// Logout failed
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTPlayer playerApi;

playerApi.logout(GetSafeHwnd(), false, [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// Logout successful
		
		// [TODO] Return Duringto the CBT period, authentication may not be possible for users who are not allowed. Provide an appropriate notification to the user.
	}
	else if (KakaoGame::Data::KGTResultCode::UserCanceled == result.code)
	{
		// [TODO] Since the user canceled during the login process, the login screen should be maintained.
	}
	else
	{
		// [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
	}
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Set the idpCode you want to log in with
KakaoGame::Data::KGTIdpCode idpCode = KakaoGame::Data::KGTIdpCode::Kakao;

KakaoGame::API::KGTPlayer playerApi;

playerApi.login(GetSafeHwnd(), idpCode, [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// Successfully logged in with IDP and platform
		KakaoGame::Data::KGTPlayer player;
		KakaoGame::API::KGTPlayer playerApi;
		
		playerApi.getCurrentPlayer(player);
		
		std::wstring playerId = player.playerId; // The current Player ID issued by the platform
		std::wstring accessToken = playerApi.getAccessToken(); // Platform access token (AccessToken)
		
		// [TODO] Since the login was successful, proceed to the game screen.
	}
	else
	{
		// IDP login or platform login failed
		// [TODO] If login fails, inform the user and prompt them to retry.
		if (KakaoGame::Data::KGTResultCode::NetworkFailure == result.code
			|| KakaoGame::Data::KGTResultCode::ServerTimeout == result.code
			||  start screen
	}
	else
	{
		// Logout failed
	}
});

Unregistration

...

발췌문 삽입
Unregistration SDK Example
Unregistration SDK Example
nameunregister
nopaneltrue

Unregistering Without Using the Default Unregistration UI

발췌문 삽입
Unregistration SDK Example
Unregistration SDK Example
nameunregister_custom
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::Data::KGTResult result;
KakaoGame::API::KGTPlayer playerApi;

playerApi.unregister(GetSafeHwnd(), false, result);

if (result.isSuccess())
{
	// Unregistration successful
	
	// [TODO] Return to the start screen
}
else
{
	// Unregistration failed
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTPlayer playerApi;

playerApi.unregister(GetSafeHwnd(), false, [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// Unregistration successful
		
		// [TODO] Return to the start screen
	}
	else
	{
		// Unregistration failed
	}
});

Account Linking

...

발췌문 삽입
Account Linking SDK Example
Account Linking SDK Example
nameconnect
nopaneltrue

Linking Accounts Without Using the Default Account Linking UI

발췌문 삽입
Account Linking SDK Example
Account Linking SDK Example
nameconnect_custom
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Set the idpCode to connect to
KakaoGame::Data::KGTIdpCode idpCode = KakaoGame::Data::KGTIdpCode::Kakao;

KakaoGame::Data::KGTResult result;
KakaoGame::API::KGTPlayer playerApi;

playerApi.connect(GetSafeHwnd(), idpCode, result);

if (result.isSuccess())
{
	// IDP connection successful
	// Player ID is not changed.
}
else
{
	// IDP connection failed
	if (KakaoGame::Data::KGTResultCode::ConnectionFailedInvalidParameter == result.code)
		{
			// [TODO]An Ifinvalid aparameter network error occurs, notify the user that the start failed due to a network issue and retry.
	was passed
	}
		else if (KakaoGame::Data::KGTResultCode::ForbiddenNotAuthorized == result.code)
		{
			// [TODO] If the The user is not allowedcurrently during the CBT period, authentication may not be possible. Provide a notification message to the user.
	logged in
	}
		else if (KakaoGame::Data::KGTResultCode::UserCanceledInvalidState == result.code)
		{
			// [TODO] Since the user canceled during the login process, the login screen should be maintained.
		}
		else
		code)
	{
			// [TODO]The Ifcurrent otherauthenticated errorsIDP occur,is providenot an errorIDP notificationthat andcan requestbe alinked retryto ofthe theaccount
start process. - If the issue persists, check the error code and logs to determine the cause.
		}	}
	else if (KakaoGame::Data::KGTResultCode::AlreadyUsedIDPAccount == result.code)
	{
		// The account is already linked to another IDP
	}
	else
	{
		// Other errors occurred
	}
});

Logging in Using a Square Token

...

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// UserSet IDthe requestingidpCode login
std::wstring playerId;

// Token received from Square
std::wstring squareToken;

to connect to
KakaoGame::Data::KGTResult result;
KakaoGame::API::KGTPlayer playerApi;

playerApi.loginIdpWithSquareToken(GetSafeHwnd(), playerId, squareToken, result);

if (result.isSuccess())
{
	// Successful IDP and platform login
	KGTIdpCode idpCode = KakaoGame::Data::KGTIdpCode::KGTPlayerKakao;
player;
	KakaoGame::API::KGTPlayer playerApi;
	
	playerApi.getCurrentPlayerconnect(GetSafeHwnd(player);, 	
	stdidpCode, [this](KakaoGame::Data::wstringKGTResult playerIdresult) = player.playerId; // Current Player ID issued by the platform
	std::wstring accessToken = playerApi.getAccessToken(); // Platform access token (AccessToken)
	
	// [TODO] Since login was successful, proceed to the game screen.
}
else
{
	{
	if (result.isSuccess())
	{
		// IDP connection successful
		// Player ID is not changed.
	}
	else
	{
		// IDP orconnection platform login failed
		// [TODO] If login fails, notify the user and request a retry.
	if (KakaoGame::Data::KGTResultCode::InvalidParameter == result.code)
		{
			// An invalid parameter was passed
		}
		else if (KakaoGame::Data::KGTResultCode::NetworkFailureNotAuthorized == result.code)
			|| KakaoGame::Data::KGTResultCode::ServerTimeout == result.code
		|| {
			// The user is not currently logged in
		}
		else if (KakaoGame::Data::KGTResultCode::ConnectionFailedInvalidState == result.code)
		{
			// [TODO]The Ifcurrent aauthenticated networkIDP erroris occurs,not notifyan the userIDP that thecan startbe failed duelinked to athe network issue and retry.
account
		}
		else 	{
		// [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
	}
}

...

if (KakaoGame::Data::KGTResultCode::AlreadyUsedIDPAccount == result.code)
		{
			// The account is already linked to another IDP
		}
		else
		{
			// Other errors occurred
		}
	}
});

Profile

...

Retrieve My Information

발췌문 삽입
Profile SDK Example
Profile SDK Example
nameplayer_currentPlayer
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// User ID requesting
login
stdKakaoGame::wstring playerId;

// Token received from Square
stdData::wstringKGTPlayer squareTokenplayer;

KakaoGame::API::KGTPlayer playerApi;

playerApi.logingetCurrentPlayer(GetSafeHwnd(), playerId, squareToken, [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// IDP login and platform login successful
		player);

Retrieve My IDP Information

발췌문 삽입
Profile SDK Example
Profile SDK Example
nameplayer_idpProfile
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::Data::KGTPlayer player;
		KakaoGame::API::KGTPlayer playerApi;
		
		playerApi.getCurrentPlayer(player);
		
		std::wstring
playerId
= player.playerId; // The current Player's ID issued by the platform
		kakaoProfile;

System Information

...

Retrieve Language Code

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_language_code
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring accessTokenlanguageCode = playerApisystemApi.getAccessToken(); // Platform access token (AccessToken)
		
		// [TODO] Since login was successful, proceed to the game screen.
	}
	else
	{
		// IDP login or platform login failed
		// [TODO] If login fails, notify the user and request a retry.
		if (KakaoGame::Data::KGTResultCode::NetworkFailure == result.code
			|| KakaoGame::Data::KGTResultCode::ServerTimeout == result.code
			|| KakaoGame::Data::KGTResultCode::ConnectionFailed == result.code)
		{
			// [TODO] If a network error occurs, notify the user that the start failed due to a network issue and retry..
		}
		else
		{
			// [TODO] If other errors occur, provide an error notification and request a retry of the start process. - If the issue persists, check the error code and logs to determine the cause.
		}
	}
});

Logout

...

Logging Out Without Using the Default Logout UI

...

Synchronous Example

getLanguageCode();

Retrieve Language Tag

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_language_tag
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring languageCode = systemApi.getLanguageTag();

Retrieve Country Code

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_country_code
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring countryCode = systemApi.getCountryCode();

Retrieve IP-based Country Code

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_geo_country_code
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring countryCode = systemApi.getGeoCountryCode();

Retrieve Device ID

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_device_id
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring deviceId = systemApi.getDeviceId();

Retrieve Device Model

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_device_model
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring deviceModel = systemApi.getDeviceModel();

Retrieve OS Name

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_os_name
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring osName = systemApi.getOSName();

Retrieve Network Connection Status

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_is_network_connected
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::DataAPI::KGTResultKGTSystem resultsystemApi;
KakaoGame::API::KGTPlayer playerApi;

playerApi.logout(GetSafeHwnd(), false, result);

if (result.isSuccess())
{
	// Logout successful
	
	// [TODO] Return to the start screen
}
else
{
	// Logout failed
}

Asynchronous Example


boolean networkConnected = systemApi.isNetworkConnected();

Retrieve Connected Network Type

발췌문 삽입
System Information SDK Example
System Information SDK Example
namesystem_network_type
nopaneltrue

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring networkType = systemApi.getNetworkType();

Get the Set Game Language Code

Returns the set game language code.

If no language code is set, it retrieves the language setting information configured on the device, and the language code is returned according to the ISO 639-1 standard.

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTPlayerKGTSystem playerApi;

playerApi.logout(GetSafeHwnd(), false, [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// Logout successful
		
		// [TODO] Return to the start screen
	}
	else
	{
		// Logout failed
	}
});

Unregistration

...

Unregistering Without Using the Default Unregistration UI

...

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"
systemApi;

std::wstring gameLanguageCode = systemApi.getGameLanguageCode();

Set the Game Language Code

Configures the game to use the language synchronized with the platform.

The following language codes are supported:

(Can be set before calling the Start API)

  • device: Device setting value. Can be used to revert to the device's setting value. (default)

  • en: English

  • ko: Korean

  • ja: Japanese

  • zh_hant: Chinese (Traditional)

  • zh_hans: Chinese (Simplified)

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::en; // English
// KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::ko; // Korean
// KakaoGame::Data::KGTResult result;KGTLanguageCode languageCode = KakaoGame::APIData::KGTLanguageCode::KGTPlayer playerApi;

playerApi.unregister(GetSafeHwnd(), false, result);

if (result.isSuccess())
{
	// Unregistration successful
	
	// [TODO] Return to the start screen
}
else
{
	// Unregistration failed
}

...

ja; // Japanese
// KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::zh_hant; // Chinese(Traditional)
// KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::zh_hans; // Chinese (Simplified)
KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::device; // Device setting value

KakaoGame::API::KGTSystem systemApi;

systemApi.setGameLanguageCode(languageCode);

Kakao Integration Feature

...

Setting Up KakaoTalk Game Message Reception

발췌문 삽입
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_show_setting
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::Data::KGTResult result;
bool isAlloweMe;
KakaoGame::API::KGTPlayerKGTKakaoTalk playerApi;

playerApi.unregisterkakaotalkApi;

// Display the view to set KakaoTalk game message reception preferences
kakaotalkApi.showSetting(GetSafeHwnd(), falseresult, [this](KakaoGame::Data::KGTResult result) {
	isAlloweMe);

if (result.isSuccess())
	{
		// Unregistration successful
		
		// [TODO] Return to the start screen
	}
	else
	{
		// Unregistration failed
	}
});

Account Linking

...

Linking Accounts Without Using the Default Account Linking UI

...

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Set the idpCode to connect to
KakaoGame::Data::KGTIdpCode idpCode = KakaoGame::Data::KGTIdpCode::Kakao;

KakaoGame::Data::KGTResult result;
KakaoGame::API::KGTPlayer playerApi;

playerApi.connect(GetSafeHwnd(), idpCode, result);

if (result.isSuccess())
{
	// IDP connection successful
	// Player ID is not changed.
}
else
{
	// IDP connection failed
	if (KakaoGame::Data::KGTResultCode::InvalidParameter == result.code Successfully set the KakaoTalk game message reception settings
	isAlloweMe; // Whether message reception is allowed as per the settings
}
else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
{
	// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
}
else
{
	// Failed to set the KakaoTalk game message reception settings
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Display the view to set KakaoTalk game message reception preferences
kakaotalkApi.showSetting(GetSafeHwnd(), [this](KakaoGame::Data::KGTResult result, bool isAlloweMe) {
	if (result.isSuccess())
	{
		// An invalid parameter was passed Successfully set the KakaoTalk game message reception settings
		isAlloweMe; // Whether message reception is allowed as per the settings
	}
	else if (KakaoGame::Data::KGTResultCodeKGTResult::NotAuthorizedNotKakaoTalkUser == result.code)
	{
		// The logged-in user is not currently logged in
	}
	else if (KakaoGame::Data::KGTResultCode::InvalidState == result.code)a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
	}
	else
	{
		// TheFailed currentto authenticatedset IDPthe isKakaoTalk notgame anmessage IDPreception thatsettings
can be linked to the account
	}
	else if (KakaoGame::Data::KGTResultCode::AlreadyUsedIDPAccount == result.code)
	{
		// The account is already linked to another IDP
	}
	else
	{
		// Other errors occurred
	}
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Set the idpCode to connect to
KakaoGame::Data::KGTIdpCode idpCode = KakaoGame::Data::KGTIdpCode::Kakao;

KakaoGame::API::KGTPlayer playerApi;

playerApi.connect(GetSafeHwnd(), idpCode, [this]	}
});

Retrieve KakaoTalk Profile

발췌문 삽입
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_talk_profile
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::Data::KGTResult result;
KakaoGame::Data::KGTKakaoTalkProfile profile;
KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Retrieve KakaoTalk profile
kakaotalkApi.talkProfile(result, profile);

if (result.isSuccess())
{
	// Successfully retrieved KakaoTalk profile
	profile; // KakaoTalk profile information of the logged-in user
}
else if (KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// IDP connection successful
		// Player ID is not changed.
	}
	else
	{
		// IDP connection failed
		if (KakaoGame::Data::KGTResultCode::InvalidParameter == result.code)
		{
			// An invalid parameter was passed
		}
		else if (KakaoGame::Data::KGTResultCode::NotAuthorized == result.code)
		{
			// The user is not currently logged in
		}
		::NotKakaoTalkUser == result.code)
{
	// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
}
else
{
	// Failed to retrieve KakaoTalk profile
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Retrieve KakaoTalk profile
kakaotalkApi.talkProfile([this](KakaoGame::Data::KGTResult result, KakaoGame::Data::KGTKakaoTalkProfile profile) {
	if (result.isSuccess())
	{
		// Successfully retrieved KakaoTalk profile
		profile; // KakaoTalk profile information of the logged-in user
	}
	else if (KakaoGame::Data::KGTResultCodeKGTResult::InvalidStateNotKakaoTalkUser == result.code)
		{
			// The current authenticated IDPlogged-in user is not ana IDP that can be linked to the account
		}
		else if (KakaoGame::Data::KGTResultCode::AlreadyUsedIDPAccount == result.code)
		{
			// The account is already linked to another IDP
		}
		else
		{
	'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
	}
	else
	{
		// OtherFailed errors occurred
		}
	}
});

Profile

Retrieve My Information

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::Data::KGTPlayer player;
KakaoGame::API::KGTPlayer playerApi;

playerApi.getCurrentPlayer(player);

...

to retrieve KakaoTalk profile
	}
});

Retrieve KakaoTalk Game Friend List

발췌문 삽입
Profile Kakao Integration Feature SDK ExampleProfile
Kakao Integration Feature SDK Example
nameplayerkakao_talk_idpProfilefriends
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::Data::KGTPlayerKGTResult playerresult;
KakaoGame::API::KGTPlayer playerApi;

playerApi.getCurrentPlayer(player);

player.kakaoProfile;

System Information

Retrieve Language Code

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"
std::vector<KakaoGame::Data::KGTPlayer> players;
KakaoGame::API::KGTSystemKGTKakaoTalk systemApi;

std::wstring languageCode = systemApi.getLanguageCode();

Retrieve Language Tag

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring languageCode = systemApi.getLanguageTag();

Retrieve Country Code

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring countryCode = systemApi.getCountryCode();

Retrieve IP-based Country Code

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring countryCode = systemApi.getGeoCountryCode();

Retrieve Device ID

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring deviceId = systemApi.getDeviceId();

Retrieve Device Model

...

kakaotalkApi;

// Retrieve the list of game friends
kakaotalkApi.friends(result, players);

if (result.isSuccess())
{
	// Successfully retrieved KakaoTalk game friends list.
	// Game friends list
	for each (auto player in players)
	{
	}
}
else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
{
	// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
}
else
{
	// Failed to retrieve KakaoTalk profile
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystemKGTKakaoTalk systemApi;

std::wstring deviceModel = systemApi.getDeviceModel();

Retrieve OS Name

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring osName = systemApi.getOSName();

Retrieve Network Connection Status

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

boolean networkConnected = systemApi.isNetworkConnected();

Retrieve Connected Network Type

...

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring networkType = systemApi.getNetworkType();

Get the Set Game Language Code

Returns the set game language code.

If no language code is set, it retrieves the language setting information configured on the device, and the language code is returned according to the ISO 639-1 standard.

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTSystem systemApi;

std::wstring gameLanguageCode = systemApi.getGameLanguageCode();

Set the Game Language Code

Configures the game to use the language synchronized with the platform.

The following language codes are supported:

(Can be set before calling the Start API)

...

device: Device setting value. Can be used to revert to the device's setting value. (default)

...

en: English

...

ko: Korean

...

ja: Japanese

...

zh_hant: Chinese (Traditional)

...

kakaotalkApi;

// Retrieve the list of game friends
kakaotalkApi.friends([this](KakaoGame::Data::KGTResult result, std::vector<KakaoGame::Data::KGTPlayer> players) {
	if (result.isSuccess())
	{
		// Successfully retrieved KakaoTalk game friends list.
		// Game friends list
		for each (auto player in players)
		{
		}
	}
	else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
	{
		// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
	}
	else
	{
		// Failed to retrieve KakaoTalk game friends list
	}
});

Sending KakaoTalk Game Messages

발췌문 삽입
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_send_game_message
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::en; // English
// KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::ko; // Korean
// KakaoGame::Data::KGTLanguageCode languageCode =Friend object retrieved via the friends API
KakaoGame::Data::KGTLanguageCode::jaKGTKakaoProfile kakaoProfile;

// Japanese
// KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::zh_hant; // Chinese(Traditional)
// KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::zh_hans; // Chinese (Simplified)
KakaoGame::Data::KGTLanguageCode languageCode = KakaoGame::Data::KGTLanguageCode::device; // Device setting value

KakaoGame::API::KGTSystem systemApi;

systemApi.setGameLanguageCode(languageCode);

Kakao Integration Feature

Setting Up KakaoTalk Game Message Reception

...

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h" [TODO] Set the template Id
std::wstring templateId = TEXT("");

// [TODO] Set the parameters for the message template
std::map<std::wstring, std::wstring> arguments;
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("${nickname}"), kakaoProfile.nickname));
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("rog_link"), TEXT("test=100&hello=20111")));
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("bruce2"), kTEXT("test=100&hello=20111")));

KakaoGame::Data::KGTResult result;
bool isAlloweMe;
KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Display the view to set Send a KakaoTalk game message
reception preferences
kakaotalkApi.showSetting(GetSafeHwnd()sendGameMessage(kakaoProfile, templateId, resultarguments, isAlloweMeresult);

if (result.isSuccess())
{
	// Successfully setsent the KakaoTalk game message reception settings
	isAlloweMe; // Whether message reception is allowed as per the settings
chat message
}
else if (KakaoGame::Data::KGTResult::NotKakaoTalkUserMessageSettingDisabled == result.code)
{
	// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
}
else result.code)
{
	// The Failedrecipient tohas set themessage KakaoTalkreception gameto message reception settings
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Display the view to set KakaoTalk game message reception preferences
kakaotalkApi.showSetting(GetSafeHwnd(), [this]be disabled.
}
else if (KakaoGame::Data::KGTResult::ExceedDailyUsage == result.code)
{
	// Occurs when the daily quota for sending messages to a specific app (regardless of the recipient) is exceeded.
}
else if (KakaoGame::Data::KGTResult result, bool isAlloweMe) {
	if (result.isSuccess())
	{
	::ExceedMonthlyUsage == result.code)
{
	// SuccessfullyOccurs setwhen the KakaoTalk game message reception settings
		isAlloweMe; // Whether message reception is allowed as per the settings
	}
	else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
	{
		// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
	}
	else
	{
		// Failed to set the KakaoTalk game message reception settings
	}
});

Retrieve KakaoTalk Profile

...

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::Data::KGTResult result;
KakaoGame::Data::KGTKakaoTalkProfile profile; monthly quota for sending messages to a specific person for a specific app is exceeded.
}
else
{
	// Failed to send KakaoTalk chat message
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Friend object retrieved via the friends API
KakaoGame::Data::KGTKakaoProfile kakaoProfile;

// [TODO] Set the template Id
std::wstring templateId = TEXT("");

// [TODO] Set the parameters for the message template
std::map<std::wstring, std::wstring> arguments;
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("${nickname}"), kakaoProfile.nickname));
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("rog_link"), TEXT("test=100&hello=20111")));
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("bruce2"), kTEXT("test=100&hello=20111")));

KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Send Retrievea KakaoTalk profile
kakaotalkApi.talkProfile(result, profile);

 game message
kakaotalkApi.sendGameMessage(kakaoProfile, templateId, arguments, [this](KakaoGame::Data::KGTResult result) {
	if (result.isSuccess())
	{
		// Successfully retrievedsent KakaoTalk profile
	profile; // KakaoTalk profile information of the logged-in user
}
chat message
	}
	else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
{
	// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
}
else
{
	// Failed to retrieve KakaoTalk profile
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Retrieve KakaoTalk profile
kakaotalkApi.talkProfile([this](MessageSettingDisabled == result.code)
	{
		// The recipient has set message reception to be disabled.
	}
	else if (KakaoGame::Data::KGTResult result, KakaoGame::Data::KGTKakaoTalkProfile profileExceedDailyUsage == result.code)
	{
		if (result.isSuccess())
	{
		// Successfully retrieved KakaoTalk profile
		profile; // KakaoTalk profile information// Occurs when the daily quota for sending messages to a specific app (regardless of the logged-in userrecipient) is exceeded.
	}
	else if (KakaoGame::Data::KGTResult::NotKakaoTalkUserExceedMonthlyUsage == result.code)
	{
		// TheOccurs logged-inwhen userthe ismonthly notquota afor 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalksending messages to a specific person for a specific app is exceeded.
	}
	else
	{
		// Failed to retrievesend KakaoTalk chat profilemessage
	}
});

...

Adding a KakaoTalk Channel

발췌문 삽입
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_friendsadd_plus_friend
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// [TODO] Set the channel Id
int channelId = 0;

KakaoGame::Data::KGTResult result;
std::vector<KakaoGame::Data::KGTPlayer> players;
KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Retrieve the list of game friends
kakaotalkApi.friendsaddChannel(resultchannelId, playersresult);

if (result.isSuccess())
{
	// Successfully retrievedadded KakaoTalkthe game friends list.
	// Game friends list
	for each (auto player in players)
	{
	}
}
channel
}
else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
{
	// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
}
else
{
	// Failed to retrieveadd KakaoTalkthe profilechannel
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// [TODO] Set the channel Id
int channelId = 0;

KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Retrieve the list
of
game friends
kakaotalkApi.friendsaddChannel(channelId, [this](KakaoGame::Data::KGTResult result, std::vector<KakaoGame::Data::KGTPlayer> players) {
	if (result.isSuccess())
	{
		// Successfully retrieved KakaoTalk game friends list.
		// Game friends list
		for each (auto player in players)
		{
		}// Successfully added the channel
	}
	else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
	{
		// The logged-in user is not a 'KakaoTalk' user. This occurs when the user is only registered with KakaoStory and not KakaoTalk.
	}
	else
	{
		// Failed to retrieveadd KakaoTalkthe gamechannel
friends list
	}
});

...

Retrieve the list of friends to whom I sent an invite message

발췌문 삽입
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_send_game_messageinvitation_joiners
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Friend object retrieved via the friends API
KakaoGame::Data::KGTKakaoProfile kakaoProfile;

// [TODO] Set the template Id
std::wstring templateId = TEXT("");
#include "KakaoGameLib.h"
// [TODO] Set the parametersevent for the message template
std::map<std::wstring, std::wstring> arguments;
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("${nickname}"), kakaoProfile.nickname));
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("rog_link"), TEXT("test=100&hello=20111")));
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("bruce2"), kTEXT("test=100&hello=20111")));

KakaoGameID
int32 eventId = 0;
KakaoGame::Data::KGTResult result;
std::vector<KakaoGame::Data::KGTResultKGTPlayer> resultplayers;
KakaoGame::API::KGTKakaoTalkKGTKakaoInvitation kakaotalkApikakaoInvitationApi;

// Retrieve Sendthe list aof KakaoTalkplayers gameI messageinvited
kakaotalkApikakaoInvitationApi.sendGameMessagejoiners(kakaoProfileeventId, templateIdresult, arguments, resultplayers);

if (result.isSuccess())
{
	// Successfully sent KakaoTalk chat message
}
else if retrieved the list of players I invited
    for (KakaoGame::Data::KGTResult::MessageSettingDisabled == result.code)
{
	// The recipient has set message reception to be disabled.
}
else if (KakaoGame::Data::KGTResult::ExceedDailyUsage == result.code)
{
	// Occurs when the daily quota for sending messages to a specific app (regardless of the recipient) is exceeded.
}
else if (KakaoGame::Data::KGTResult::ExceedMonthlyUsage == result.code)
{
	// Occurs when the monthly quota for sending messages to a specific person for a specific app is exceeded.
}
else
{
	// Failed to send KakaoTalk chat message
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// Friend object retrieved via the friends API
KakaoGame::Data::KGTKakaoProfile kakaoProfile;

// [TODO] Set the template Id
std::wstring templateId = TEXT("");

// [TODO] Set the parameters for the message template
std::map<std::wstring, std::wstring> arguments;
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("${nickname}"), kakaoProfile.nickname));
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("rog_link"), TEXT("test=100&hello=20111")));
arguments.insert(std::pair<std::wstring, std::wstring>(TEXT("bruce2"), kTEXT("test=100&hello=20111")));

KakaoGame::API::KGTKakaoTalk kakaotalkApi;

// Send a KakaoTalk game message
kakaotalkApi.sendGameMessage(kakaoProfile, templateId, arguments, KGTPlayer player : players)
    {
      // Recipient's player ID
      player.playerId;
      // Recipient's nickname
      player.kakaoProfile.nickname;
      // Recipient's profile thumbnail image
      player.kakaoProfile.thumbnailImageUrl;
      // Check if the recipient has a withdrawal history. Use this flag to display withdrawal information in the UI.
      player.kakaoProfile.isUnregistered;
    }
}
else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
{
	// The logged-in user is not a 'KakaoTalk' user. (For cases where the user is not a KakaoTalk user)
}
else
{
	// Failed to retrieve the list
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"
// [TODO] Set the event ID
int32 eventId = 0;
KakaoGame::API::KGTKakaoInvitation kakaoInvitationApi;

// Retrieve the list of players I invited
kakaoInvitationApi.joiners(eventId, [this](KakaoGame::Data::KGTResult result, int32_t totalReceiversCount, int32_t joinersCount) {
	if (result.isSuccess())
	{
		// Successfully sent KakaoTalk chat message
	}
	else if  retrieved the list of players I invited
		for (KakaoGame::Data::KGTResult::MessageSettingDisabled == result.codeKGTPlayer player : players)
		{
			// TheRecipient's recipientplayer has set message reception to be disabled.
	}
	else if (KakaoGame::Data::KGTResult::ExceedDailyUsage == result.code)
	{
ID
			player.playerId;
			// Recipient's nickname
			player.kakaoProfile.nickname;
			// Recipient's profile thumbnail image
			player.kakaoProfile.thumbnailImageUrl;
			// OccursCheck whenif the daily quota for sending messages recipient has a withdrawal history. Use this flag to adisplay specificwithdrawal appinformation (regardlessin of the recipient) is exceeded.UI.
			player.kakaoProfile.isUnregistered;
		}
	}
	else if (KakaoGame::Data::KGTResult::ExceedMonthlyUsageNotKakaoTalkUser == result.code)
	{
		// OccursThe whenlogged-in theuser monthlyis quotanot fora sending messages to a specific person for a specific app is exceeded.'KakaoTalk' user. (For cases where the user is not a KakaoTalk user)
	}
	else
	{
		// Failed to sendretrieve KakaoTalkthe chatlist
message
	}
});

...

Retrieve the count of friends to whom I sent an invite message

발췌문 삽입
Kakao Integration Feature SDK Example
Kakao Integration Feature SDK Example
namekakao_talk_addinvitation_plusreceivers_friendcount
nopaneltrue

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// [TODO] Set the channelevent IdID
intint32 channelIdeventId = 0;

KakaoGame::Data::KGTResult result;
int32 totalReceiversCount;
int32 joinersCount;
KakaoGame::API::KGTKakaoTalkKGTKakaoInvitation kakaotalkApi;

kakaotalkApi.addChannel(channelId, resultkakaoInvitationApi;

// Retrieve the count of players I invited
kakaoInvitationApi.receiversCount(eventId, result, totalReceiversCount, joinersCount);

if (result.isSuccess())
{
	// Successfully added retrieved the counts
    // totalReceiversCount - Total number of friends
    // joinersCount - Number of friends who joined the channelgame
}
else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
{
	// The logged-in user is not a 'KakaoTalk' user. This(For occurscases whenwhere the user is onlynot registereda with KakaoStory and not KakaoTalk.
KakaoTalk user)
}
else
{
	// Failed to addretrieve the channelcounts
}

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

// [TODO] Set the channelevent IdID
intint32 channelIdeventId = 0;

KakaoGame::API::KGTKakaoTalkKGTKakaoInvitation kakaotalkApikakaoInvitationApi;

kakaotalkApi.addChannel(channelId// Retrieve the count of players I invited
kakaoInvitationApi.receiversCount(eventId, [this](KakaoGame::Data::KGTResult result, int32_t totalReceiversCount, int32_t joinersCount) {
	if (result.isSuccess())
	{
		// Successfully addedretrieved the counts
		// totalReceiversCount - Total number of friends
		// joinersCount - Number of friends who joined the channelgame
	}
	else if (KakaoGame::Data::KGTResult::NotKakaoTalkUser == result.code)
	{
		// The logged-in user is not a 'KakaoTalk' user. This(For occurscases whenwhere the user is onlynot registereda withKakaoTalk KakaoStory and not KakaoTalk.
user)
	}
	else
	{
		// Failed to add the channel
	}
});

Retrieve the list of friends to whom I sent an invite message

...

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

Retrieve the count of friends to whom I sent an invite message

...

Synchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"

Asynchronous Example

코드 블럭
languagecpp
#include "KakaoGameLib.h"


	{
		// Failed to retrieve the counts
	}
});