import com.kakaogame.KGTKakaoTalk;
message.
KGTKakaoInvitation.joiners(eventId, result -> {
if (result.isSuccess()) {
// Successfully retrieve the list of friends.
// Retrieve the list of players I have invited.
KGTKakaoInvitation.KGTInvitationJoinersResponse joinersResponse = result.getContent();
// List of players who have joined the app, including those who have left.
List<KGTPlayer> joiners = joinersResponse.getPlayers();
if (joiners.isEmpty()) {
// No users have joined the app.
} else {
// There are users who have joined the app.
for (KGTPlayer player : joiners) {
// Recipient’s player ID
String playerId = player.getPlayerId();
KGTKakaoFriendProfile kakaoProfile = (KGTKakaoFriendProfile) player.getIdpProfile();
// Recipient’s nickname
String nickname = kakaoProfile.getNickname();
// Recipient’s profile thumbnail image
String thumbnailImageUrl = kakaoProfile.getThumbnailImageUrl();
// Recipient’s withdrawal history inquiry. Use the corresponding flag when displaying the withdrawal status information in the UI.
boolean isUnregistered = kakaoProfile.isUnregistered();
}
}
} else if (result.getCode() == KGTResult.KGTResultCode.NOT_KAKAOTALK_USER) {
// 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 the list of friends.
}
}); |