Giter VIP home page Giter VIP logo

react-native-kakao-link-js's Introduction

RNKakaoLinkJS

NPM version NPM downloads

react-native-kakao-link-js

  • 네이티브 의존성 없이, 카카오 링크를 사용하기 위한 모듈입니다. (웹뷰를 통해 자바스크립트 SDK 를 사용합니다.)
  • kakao link for react native without native dependency (except webview!)

Installation

  1. yarn add react-native-kakao-link-js

2-1. yarn add react-native-webview

2-2. cd ios && pod install or npx pod-install

Feature

Props

  • whitelistedDomain(필수): 카카오 앱에 등록된 도메인
  • webKakaoKey(필수): 웹용 카카오 앱 키
  • onShareFailure(옵션): 카카오 링크 동작에 실패한 경우 트리거됩니다.

Example

const ShareButton = () => {
    const kakaoLink = React.useRef<KakaoLink>();
    const shareKakao = () => {
        kakaoLink.current?.sendCustom({
            templateId: 12345,
            templateArgs: {
                title: "your custom arguments",
                body: "your custom arguments"
            }
        });
    };
    const onShareFailure = () => {
        // 카카오톡 설치가 안된 경우
        Alert.alert("알림", "카카오 공유하기에 실패했습니다.");
    };

    return (
        <TouchableOpacity onPress={shareKakao}>
            <Text>Share</Text>
            <KakaoLink
                ref={kakaoLink}
                whitelistedDomain={"https://domain.whitelisted.com"}
                webKakaoKey={"your-web-app-key"}
                onShareFailure={onShareFailure}
            />
        </TouchableOpacity>
    );
};

react-native-kakao-link-js's People

Contributors

bang9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

james-song

react-native-kakao-link-js's Issues

예제 파일 미동작

안녕하세요. readme에 제공해주신 예제 이용하여 테스트를 해보는데 버튼 클릭 후 액션이 일어나지 않아 문의드립니다.
예제와 거의 동일하게 구성하였고, whitelistedDomain을 카카오 웹플랫폼에 http://localhost을 등록하여 설정하였으나, 제대로 실행되지 않는 것 같습니다; 뭔가 놓치고 있는게 있는지 말씀해주실 수 있을까요?

감사합니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.