Select KakaoTalk Friends
Selecting KakaoTalk Friends
To use the API, the user must have agreed to Kakao login and consent items related to the profile information, nickname, and profile picture.
The picker and get friends list API can only be used in apps granted permission.
Before getting permission, the feature is restricted to the app team members only. To enable the feature for all users in a live service, you need to apply for permission in [My Applications] > [Request App Permissions]
.
For information on requesting permissions, refer to the Official Documentation.
If the consent items are set to be used during usage, when trying to call the API that uses the function, permissions prompt like the image above will be displayed.
A picker that fills the entire screen with mode='full'
.
A popup-style picker with mode='popup'
.
Common Types
The option object for configuring the friend picker and friend object are defined as follows:
export interface KakaoTalkFriendSelectOptions {
/** Friend picker title */
title?: string;
/** Friend picker theme */
viewAppearance?: 'auto' | 'light' | 'dark';
/** Friend picker device orientation */
orientation?: 'auto' | 'landscape' | 'portrait';
/** Enable friend search feature */
enableSearch?: boolean;
/** Show my profile */
showMyProfile?: boolean;
/** Show favorite friends */
showFavorite?: boolean;
/** Show picked friends (only available for multi-picker) */
showPickedFriend?: boolean;
/** Maximum number of friends that can be selected (only available for multi-picker) */
maxPickableCount?: number;
/** Minimum number of friends that can be selected (only available for multi-picker) */
minPickableCount?: number;
}
export interface KakaoTalkFriendProfile {
/** Unique identifier for message transmission. */
uuid: string;
/** Member number of the friend, only exists for friends connected to the app. */
id?: number;
/** Favorite status, not provided in chat room picker. */
favorite?: boolean;
/** Profile nickname. */
profileNickname?: string;
/** Profile thumbnail image URL. */
profileThumbnailImage?: string;
}
Select Single Friend
You can use selectSingleFriend()
to choose a single friend.
It is defined as follows:
The mode
determines whether the screen covers the entire picker or opens as a popup.
export async function selectSingleFriend(params: {
mode: 'full' | 'popup';
options?: KakaoTalkFriendSelectOptions;
}): Promise<KakaoTalkFriendProfile | undefined>
Select Multiple Friends
You can select multiple friends using selectMultipleFriends()
.
It is defined as follows:
The mode
determines whether the screen covers the entire picker or opens as a popup.
export function selectMultipleFriends(params: {
mode: 'full' | 'popup';
options?: KakaoTalkFriendSelectOptions;
})