trabricks-react / react-native-kakao-channel

MIT License
3 stars 7 forks source link

카카오톡 채널 for React Native

platforms npm npm

github issues github closed issues Issue Stats

Guide Index

기본설정

기본설정 부분은 KakaoSDK 시작하기(React-Native)를 참고해서 설정하시면 됩니다.

dependencies로 되어있어서 같이 설치가 됩니다.

궁금한 사항이 있는경우 카카오톡 오픈채팅 React & React-Native에서 물어보면 많은 분들이 답변해주십니다.

작업하시다가 외주 혹은 작업할 업체가 필요하면 project@trabricks.io로 메일 주시면 친절하게 안내해드립니다.

Getting started

Mostly automatic installation (RN >= 0.60)

$ npm install @actbase/react-native-kakaosdk @actbase/react-native-kakao-channel --save
$ cd ios && pod install && cd ..

Mostly automatic installation (RN <= 0.59)

$ npm install @actbase/react-native-kakaosdk @actbase/react-native-kakao-channel --save
$ react-native link @actbase/react-native-kakaosdk @actbase/react-native-kakao-channel
$ cd ios && pod install && cd ..

카카오톡 채널 추가하기

카카오톡 채널 추가 기능은 아래와 같이 동작합니다.

const plusFreindId: string = "_asdfGH";
KakaoSDK.Channel
  .addFriend(plusFriendId)
  .then(res => console.log(res))
  .catch(e => console.log(e));

카카오톡 채널 1:1 채팅하기

카카오톡 채널 1:1채팅 기능은 아래와 같이 동작합니다.

KakaoSDK.Channel
  .chat(plusFriendId)
  .then(res => console.log(res))
  .catch(e => console.log(e));