버전 비교

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

22.1. Reward Invitation(beta) Example

목차
minLevel1
maxLevel7

...

경고

Do not mix with new 3.9.0 or higher APIs.

...

By default, this is the same as sending a regular invitation, but you must use the templateId for compensating invites and add an invitation_event_id.

(Guide : 20. Kakaotalk Message Template V2)

Unity

코드 블럭
using Kakaogame.SDK;
// [TODO] Get Kakao profile information from invitable friends list.
KGKakaoProfile kakaoProfile;
// [TODO] Set invitation message template ID.
string templateId = "1679";
// [TODO] Add the required arguments to the invitation message
Dictionary<string, object> argumentDic = new Dictionary<string, object>() {
    {"name", "Nickname"},
    {"iphoneMarketParam" : "test"},
    {"iphoneExecParam", "test"},
    {"sender_name", "iOSTester"},
    {"invitation_event_id", 29} // Add only for compensated invitations
};
// Send an invitation message to KakaoTalk.
KGKakaoTalkMessage.SendNewInviteMessage(
    kakaoProfile,
    templateId,
    argumentDic,
    (result) => {
        if (result.isSuccess) {
            // Send invitation message to KakaoTalk succeeded.
        }
        else if (result.code == KGResultCode.MessageSettingDisabled) {
            // The recipient set to unsubscribe.
        }
        else if (result.code == KGResultCode.ExceedDailyUsage) {
            // Occurs when one day exceeds a day's quota (regardless of recipient) that can be sent for a specific app.
        }
        else if (result.code == KGResultCode.ExceedMonthlyUsage) {
            // Occurs when one month exceeds a month's quota that a specific person can send to a particular app.
        }
        else {
            // Failed to send invitation message to KakaoTalk.
        }
    });

...