-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
329 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "Package - Channel", | ||
"position": 104, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Channel 패키지 사용법" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
sidebar_position: 102 | ||
--- | ||
|
||
# 카카오톡 채널 추가하기 | ||
|
||
## 카카오톡 채널 추가하기 | ||
|
||
사용자가 카카오톡 채널을 친구 추가하러 이동합니다. | ||
|
||
[공식 문서](https://developers.kakao.com/docs/latest/ko/kakaotalk-channel/ios#add-channel) | ||
|
||
`addChannel`함수로 카카오톡 채널 추가를 할 수 있습니다. | ||
|
||
```tsx | ||
export function addChannel(channelPublicId: string): Promise<void> | ||
``` | ||
|
||
- `channelPublicId`: 추가하려는 카카오톡 채널의 ID입니다. | ||
|
||
|
||
## 카카오톡 채널 추가 URL 얻어오기 | ||
|
||
`getAddChannelUrl`함수로 카카오톡 채널 추가를 할 수 있는 URL을 얻어올 수 있습니다. | ||
|
||
```tsx | ||
export function getAddChannelUrl(channelPublicId: string): Promise<string> | ||
``` | ||
|
||
- `channelPublicId`: 추가하려는 카카오톡 채널의 ID입니다. | ||
|
||
|
||
## 카카오톡 채널 추가 URL 브라우저에서 열기 | ||
|
||
`openAddChannelUrl`함수로 카카오톡 채널 추가를 할 수 있는 URL을 브라우저에서 열 수 있습니다. | ||
|
||
```tsx | ||
export function openAddChannelUrl(channelPublicId: string): Promise<string> | ||
``` | ||
|
||
- `channelPublicId`: 추가하려는 카카오톡 채널의 ID입니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
sidebar_position: 103 | ||
--- | ||
|
||
# 카카오톡 채널 채팅하기 | ||
|
||
## 카카오톡 채널 채팅하기 | ||
|
||
사용자가 서비스의 카카오톡 채널과 1:1 채팅을 시작합니다. | ||
|
||
[공식 문서](https://developers.kakao.com/docs/latest/ko/kakaotalk-channel/ios#add-chat) | ||
|
||
`chatChannel`함수로 카카오톡 채널 채팅을 할 수 있습니다. | ||
|
||
```tsx | ||
export function chatChannel(channelPublicId: string): Promise<void> | ||
``` | ||
|
||
- `channelPublicId`: 채팅하려는 카카오톡 채널의 ID입니다. | ||
|
||
|
||
## 카카오톡 채널 채팅 URL 얻어오기 | ||
|
||
`getChatChannelUrl`함수로 카카오톡 채널 채팅을 할 수 있는 URL을 얻어올 수 있습니다. | ||
|
||
```tsx | ||
export function getChatChannelUrl(channelPublicId: string): Promise<string> | ||
``` | ||
|
||
- `channelPublicId`: 채팅하려는 카카오톡 채널의 ID입니다. | ||
|
||
|
||
## 카카오톡 채널 채팅 URL 브라우저에서 열기 | ||
|
||
`openChatChannelUrl`함수로 카카오톡 채널 채팅을 할 수 있는 URL을 브라우저에서 열 수 있습니다. | ||
|
||
```tsx | ||
export function openChatChannelUrl(channelPublicId: string): Promise<string> | ||
``` | ||
|
||
- `channelPublicId`: 채팅하려는 카카오톡 채널의 ID입니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 999 | ||
--- | ||
|
||
# Troubleshooting & FAQ | ||
|
||
모든 에러 코드는 [공식 문서의 문제 해결](https://developers.kakao.com/docs/latest/ko/kakaotalk-channel/trouble-shooting)에서 확인합니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
sidebar_position: 101 | ||
--- | ||
|
||
# 카카오톡 채널 간편 추가하기(권장) | ||
|
||
## 카카오톡 채널 간편 추가하기 | ||
|
||
[공식 문서](https://developers.kakao.com/docs/latest/ko/kakaotalk-channel/android#follow-channel) | ||
|
||
`followChannel`함수로 카카오톡 간편 채널 추가를 할 수 있습니다. | ||
|
||
```tsx | ||
export function followChannel(channelPublicId: string): Promise<boolean>; | ||
``` | ||
|
||
결과값은 간편 채널 추가에 성공했는지 여부입니다. | ||
|
||
- `channelPublicId`: 추가하려는 카카오톡 채널의 ID입니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
sidebar_position: 104 | ||
--- | ||
|
||
# 카카오톡 채널 관계 확인하기 | ||
|
||
## 카카오톡 채널 관계 확인하기 | ||
|
||
[공식 문서](https://developers.kakao.com/docs/latest/ko/kakaotalk-channel/ios#check-relationship) | ||
|
||
`channels`함수로 카카오톡 채널 관계를 확인할 수 있습니다. | ||
|
||
```tsx | ||
export function channels(params: { channelPublicIds?: string[] } = {}): Promise<KakaoChannel[]> | ||
``` | ||
|
||
- `channelPublicIds`: 관계를 확인하려는 채널들의 ID들입니다. 전달하지 않을 시 모든 채널을 확인합니다. | ||
|
||
사용되는 타입은 다음과 같습니다. | ||
|
||
```tsx | ||
export interface KakaoChannel { | ||
uuid: string; | ||
encodedId: string; | ||
relation: 'added' | 'none' | 'blocked' | 'unknown'; | ||
updatedAt?: number; // unix | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Android 설정 | ||
|
||
:::info | ||
이 문서는 Expo를 사용한다면 건너뛰어야합니다. | ||
::: | ||
|
||
## 커스텀 URL 스킴 설정 | ||
|
||
[공식 문서](https://developers.kakao.com/docs/latest/ko/kakaotalk-channel/android#set-custom-url-scheme) | ||
|
||
카카오톡 채널 간편 추가하기를 사용하려면 `AndroidManifest.xml`에 액티비티(`Activity`) 설정을 해야 합니다. | ||
해당 기능의 내부 동작에 사용되는 액티비티 리다이렉션(Redirection)을 지원하기 위한 설정입니다. 아래 예제를 참고합니다. | ||
|
||
```xml | ||
<activity | ||
android:name="com.kakao.sdk.talk.FollowChannelHandlerActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.BROWSABLE" /> | ||
|
||
<!-- Redirect URI: "kakao${NATIVE_APP_KEY}://channel" --> | ||
<data android:host="channel" android:scheme="kakao${NATIVE_APP_KEY}" /> | ||
</intent-filter> | ||
</activity> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Expo 설정 | ||
|
||
## Android - 채널 추가 이후 앱 실행을 위한 Activity 등록 | ||
|
||
[공식 문서](https://developers.kakao.com/docs/latest/ko/kakaotalk-channel/android#set-custom-url-scheme) | ||
|
||
카카오톡 채널 간편 추가하기를 사용하려면 `AndroidManifest.xml`에 액티비티(`Activity`) 설정을 해야 합니다. | ||
해당 기능의 내부 동작에 사용되는 액티비티 리다이렉션(Redirection)을 지원하기 위한 설정입니다. 아래 예제를 참고합니다. | ||
|
||
`app.json`에 다음과 같이 추가합니다. | ||
|
||
```json title='app.json' | ||
[ | ||
"@react-native-kakao/core", | ||
{ | ||
"nativeAppKey": "{{native app key}}", | ||
"android": { | ||
// highlight-next-line | ||
"followChannelHandlerActivity": true | ||
} | ||
} | ||
], | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# iOS 설정 | ||
|
||
:::info | ||
이 문서는 Expo를 사용한다면 건너뛰어야합니다. | ||
::: | ||
|
||
## 카카오톡 앱 실행을 위한 스키마 등록 | ||
|
||
`Info.plist`의 `LSApplicationQueriesSchemes`에 `kakaoplus`를 추가합니다. | ||
|
||
:::tip | ||
기본적으로 `kakaokompassauth`, `kakaolink`, `kakaoplus`가 추가되어 있으면 됩니다. | ||
::: | ||
|
||
[공식 문서](https://developers.kakao.com/docs/latest/ko/ios/getting-started#project-plist) | ||
|
||
![figure](https://raw.githubusercontent.com/mym0404/image-archive/master/202404302353523.webp) | ||
|
||
:::note | ||
더 자세한 내용은 [공식 문서](https://developers.kakao.com/docs/latest/ko/kakaonavi/ios)를 참고해주세요. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
|
||
# 시작하기 | ||
|
||
## 시작하기 전에 | ||
|
||
[`Core`패키지에 대한 의존성을 설치](/docs/install-core)하고 관련된 [플랫폼별 설정](/docs/install-android)이 완료되어야 합니다. | ||
|
||
## 시작하기 | ||
|
||
`channel` 패키지는 카카오톡 채널과 상호작용하는 기능을 사용할 수 있는 패키지입니다. | ||
|
||
카카오톡 채널(구:플러스친구)은 카카오톡 사용자들에게 다양한 서비스 소식을 메시지와 게시물 형태로 전파할 수 있는 서비스입니다. | ||
|
||
카카오톡 채널은 친구인 사용자들에게 마케팅(Marketing) 메시지를 보내는 기능을 제공합니다. | ||
친구란 카카오톡 채널을 친구로 추가한 사용자를 말합니다. | ||
|
||
카카오톡 채널 메시지는 비용 절감을 위해 사용자의 성별, 나이, 지역, 등급 등 정보를 토대로 친구 그룹을 만들어서 보다 높은 효과가 기대되는 사용자들에게만 발송하는 것도 가능합니다. | ||
|
||
[공식 문서](https://developers.kakao.com/docs/latest/ko/kakaotalk-channel/common)를 참고해주시기 바랍니다. | ||
|
||
## 설치하기 | ||
|
||
<Tabs> | ||
<TabItem value="npm" label="NPM" default> | ||
```shell | ||
npm install --save @react-native-kakao/channel | ||
``` | ||
</TabItem> | ||
<TabItem value="yarn" label="Yarn"> | ||
```shell | ||
yarn add @react-native-kakao/channel | ||
``` | ||
</TabItem> | ||
<TabItem value="expo" label="Expo"> | ||
```shell | ||
npx expo install @react-native-kakao/channel | ||
``` | ||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.