#include "KakaoGameLib.h"
std::wstring appId, appSecrest, appKey, appVersion;
// 앱아이디, 앱시크리트는 전달하는 정보를 입력합니다.
// 실행하시는 게임프로그램의 버전을 입력합니다.
// 카카오로그인세팅만 추가할때
KakaoGame::API::KGSetting kgSetting;
kgSetting.setAppInfo(appId, appSecret, appKey, appVersion);
// 여러 로그인IDP를 지원할때
std::map<std::wstring, std::wstring> kakaoSetting, facebookSetting, googleSetting, appleSetting, twitterSetting, gamaniaSetting;
kakaoSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("kakao_client_id")));
facebookSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("facebook_client_id")));
googleSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("google_client_id")));
googleSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientSecret"), TEXT("google_client_secret")));
appleSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("apple_client_id")));
twitterSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("consumerKey"), TEXT("twitter_client_key")));
twitterSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("consumerSecret"), TEXT("twitter_client_secret")));
gamaniaSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientId"), TEXT("gamania_client_id")));
// 페이스북, 구글 로그인 시 Scope를 추가로 설정하는 경우 사용 합니다. (추가 Scope를 사용하는 경우 기술PM과 협의가 필요합니다.)
facebookSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientScope"), TEXT("user_friends")));
googleSetting.insert(std::pair<std::wstring, std::wstring>(TEXT("clientScope"), TEXT("https://www.googleapis.com/auth/googleplay.products")));
std::map<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>> idpSettings;
idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Kakao, kakaoSetting));
idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Facebook, facebookSetting));
idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Google, googleSetting));
idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::SigninWithApple, appleSetting));
idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Twitter, twitterSetting));
idpSettings.insert(std::pair<KakaoGame::Data::KGIdpCode, std::map<std::wstring, std::wstring>>(KakaoGame::Data::KGIdpCode::Gamania, gamaniaSetting));
kgSetting.setAppInfo(appId, appSecret, idpSettings, appVersion);
// 서버타입
// 국내 : KakaoGame::Data::KGServerType::QA_Type, KakaoGame::Data::KGServerType::Real_Type
// 글로벌 : KakaoGame::Data::KGServerType::QA_Global_Type, KakaoGame::Data::KGServerType::Real_Global_Type
kgSetting.setServerType(KakaoGame::Data::KGServerType::Real_Type);
// 로그레벨(verbose, debug, error, none)
KakaoGame::API::KGInternal kgInternal;
kgInternal.setLogLevel(TEXT("none")); |