친구 피커와 관련된 함수들이 포함되어 있습니다.
Methods
(static) cleanup()
친구 피커를 호출하기 위해 사용한 리소스를 해제합니다.
(static) selectChat(settings)
채팅방을 선택할 때 사용합니다.
Example
// 채팅방 피커
Kakao.Picker.selectChat({
pickerChatSelectionType: 'chat',
pickerChatFilters: ['regular'],
properties: {
title: '채팅방 선택',
enableSearch: true,
},
success: function(response) {
console.log(response)
},
fail: function(error) {
console.log(error)
},
})
// 채팅방멤버 피커
Kakao.Picker.selectChat({
pickerChatSelectionType: 'chatMember',
pickerChatFilters: ['regular'],
properties: {
title: '채팅방 선택',
enableSearch: true,
showFriendsOnly: false,
disableSelectReasons: ['msgBlocked'],
displayAllProfile: false,
maxPickableCount: 10,
minPickableCount: 1,
},
success: function(response) {
console.log(response)
},
fail: function(error) {
console.log(error)
},
})
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settings |
Object | 채팅방 피커와 관련된 설정을 key/value로 전달합니다. Properties
|
(static) selectFriend(settings)
한 명의 친구를 선택할 때 사용합니다.
Example
Kakao.Picker.selectFriend({
pickerFriendFilter: 'none',
pickerFriendType: 'talk',
properties: {
title: '친구 선택',
enableSearch: true,
countryCodes: ['kr', 'us'],
usingOsFilter: 'all',
showMyProfile: true,
showFavorite: true,
disableSelectReasons: ['msgBlocked'],
},
success: function(response) {
console.log(response)
},
fail: function(error) {
console.log(error)
},
})
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settings |
Object | 친구 피커와 관련된 설정을 key/value로 전달합니다. Properties
|
(static) selectFriends(settings)
여러 명의 친구를 선택할 때 사용합니다.
Example
Kakao.Picker.selectFriends({
pickerFriendFilter: 'none',
pickerFriendType: 'talk',
properties: {
title: '친구 선택',
enableSearch: true,
countryCodes: ['kr', 'us'],
usingOsFilter: 'all',
showMyProfile: true,
showFavorite: true,
disableSelectReasons: ['msgBlocked'],
showPickedFriend: true,
maxPickableCount: 10,
minPickableCount: 1,
},
success: function(response) {
console.log(response)
},
fail: function(error) {
console.log(error)
},
})
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settings |
Object | 친구 피커와 관련된 설정을 key/value로 전달합니다. Properties
|
Type Definitions
ChatPickerRequestParams
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
title |
String |
<optional> |
"채팅방 선택"
|
채팅방 피커 타이틀 영역에 표시될 텍스트 |
enableSearch |
Boolean |
<optional> |
true
|
검색 기능 사용 여부 |
showFriendsOnly |
Boolean |
<optional> |
false
|
채팅방 멤버 중 친구만 노출 여부 |
disableSelectReasons |
Array.<String> |
<optional> |
[]
|
메시지 수신거부 노출 여부, "msgBlocked"|"registered"|"unregistered" |
displayAllProfile |
Boolean |
<optional> |
false
|
권한이 있는 앱에 한하여 개인 정보 마스킹 해제 여부 |
maxPickableCount |
Number |
<optional> |
30
|
최대 선택 가능 친구 수 (최대 100명) |
minPickableCount |
Number |
<optional> |
1
|
최소 선택 가능 친구 수 (최대 100명) |
ChatPickerSuccessCallback(response)
Parameters:
Name | Type | Description |
---|---|---|
response |
SelectedChat |
FriendPickerRequestParams
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
title |
String |
<optional> |
"카카오톡 친구 선택"
|
친구 피커 타이틀 영역에 표시될 텍스트 |
enableSearch |
Boolean |
<optional> |
true
|
검색 기능 사용 여부 |
countryCodes |
Array.<String> |
<optional> |
[]
|
국가 코드 필터 ex) ["kr", "us", "jp", "cn"] |
usingOsFilter |
String |
<optional> |
"all"
|
모바일 환경 필터, "all"|"ios"|"android" |
showMyProfile |
Boolean |
<optional> |
true
|
내 프로필 표시 여부 |
showFavorite |
Boolean |
<optional> |
true
|
즐겨찾기 표시 여부 |
disableSelectReasons |
Array.<String> |
<optional> |
[]
|
메시지 수신거부 노출 여부, "msgBlocked"|"registered"|"unregistered" |
displayAllProfile |
Boolean |
<optional> |
false
|
권한이 있는 앱에 한하여 개인 정보 마스킹 해제 여부 |
FriendPickerSuccessCallback(response)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
response |
Object |
Properties
|
FriendsPickerRequestParams
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
showPickedFriend |
Boolean |
<optional> |
true
|
선택된 친구 표시 여부 |
maxPickableCount |
Number |
<optional> |
30
|
최대 선택 가능 친구 수 (최대 100명) |
minPickableCount |
Number |
<optional> |
1
|
최소 선택 가능 친구 수 (최대 100명) |
Type:
PickerFailCallback(error)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
error |
Object |
Properties
|
SelectedChat
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
String | 고유 식별자 |
|
member_count |
String | 채팅방 멤버 수 |
|
title_source |
String | 채팅방 이름 타입, "user"|"chat"|"default" |
|
type |
String | 채팅방 유형 (일반/오픈), "regular"|"open" |
|
image_url |
String |
<nullable> |
채팅방 이미지 |
SelectedUser
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
uuid |
String | 고유 식별자 |
|
profile_nickname |
String | 프로필 닉네임 (친구가 필요한 동의 항목에 동의하지 않았거나 앱과 연결되지 않은 경우 마스킹 처리된 닉네임 제공) |
|
profile_thumbnail_image |
String |
<nullable> |
프로필 썸네일 이미지 (친구가 필요한 동의 항목에 동의하지 않았거나 앱과 연결되지 않은 경우 미제공) |
id |
String |
<nullable> |
회원번호 (앱과 연결된 친구만 제공) |
favorite |
Boolean |
<nullable> |
즐겨찾기 설정 여부 (앱과 연결된 친구만 제공, 채팅방멤버 피커에서는 미제공) |