35.Youtube




자바스크립트를 이용하여 카톡 링크 메시지를 전송


  • 링크


  • 컨텐츠 정보


    본문

    To send a link message using javascript in KAKAO talk, the API source provided by Kakao Developers is requred.

    자바스크립트를 이용하여 카톡 링크 메시지를 전송하려면 카카오 개발자(Kakao Developers) 페이지에서 제공하는 API 관련 소스가 필요합니다.

    Follow the steps below.
    다음의 순서를 따라하면 됩니다.

    1. Create an application on the Kakao Developers site.
    1. Kakao Developers 사이트에서 애플리케이션 생성.

    2. Obtain the Javascript API key from "App Key" and reflect it in the source code below.
    2. "앱 키"에서 Javascript API 키를 획득 후 아래 소스코드에 반영.

    3. In "Platform" → "Web", add the domain to add the source code below and the domain to connect to.
    3. "플랫폼" → "Web"에서 아래의 소스코드를 추가할 도메인과 연결할 도메인 추가.
    *e.g. http://localhost:8081
    =======================
    작업

    1. Create an application on the Kakao Developers site.
     Kakao Developers 사이트에서 애플리케이션 생성.

    3232235521_1623319808.9284.png
    3232235521_1623319833.4711.png


    2. Obtain the Javascript API key from "App Key" and reflect it in the source code below.
     "앱 키"에서 Javascript API 키를 획득 후 아래 소스코드에 반영.
     3232235521_1623319932.6131.png
    3. In "Platform" → "Web", add the domain to add the source code below and the domain to connect to.
     "플랫폼" → "Web"에서 아래의 소스코드를 추가할 도메인과 연결할 도메인 추가.
    3232235521_1623320014.6698.png

    4.카카오링크에서 메세지 템플렛 생성
    3232235521_1623320175.1681.png
    3232235521_1623320194.285.png
    3232235521_1623320394.6304.png


    3232235521_1623320430.3468.png
    3232235521_1623320446.6445.png
    3232235521_1623320343.2281.png
       3232235521_1623320574.7736.png
    3232235521_1623320601.017.png

    3232235521_1623320650.0958.png
    3232235521_1623320755.1499.png
     지금까지 custom  kakao에서 설정 내용 입니다
    ================

    ■ ▶ ☞ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다 ♠ . ☞ 본자료는 https://11q.kr 에 등록 된 자료 입니다♠.

    뷰PDF add1,add2



    관련자료

    댓글 2

    11qkr님의 댓글

    < index.html >
    
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>카톡 공유</title>
    <script type="text/JavaScript" src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
    </head>
    <body>
        <input type="button" onClick="sendLinkCustom();" value="Custom"/>
        <input type="button" onClick="sendLinkDefault();" value="Default"/>
    
    <script type="text/javascript">
        function sendLinkCustom() {
            Kakao.init("[Javascript API key]");
            Kakao.Link.sendCustom({
                templateId: [templete id]
            });
        }
    </script>
    
    <script>
    try {
      function sendLinkDefault() {
        Kakao.init('[Javascript API key]')
        Kakao.Link.sendDefault({
          objectType: 'feed',
          content: {
            title: '딸기 치즈 케익',
            description: '#케익 #딸기 #삼평동 #카페 #분위기 #소개팅',
            imageUrl:
              'http://k.kakaocdn.net/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png',
            link: {
              mobileWebUrl: 'https://developers.kakao.com',
              webUrl: 'https://developers.kakao.com',
            },
          },
          social: {
            likeCount: 286,
            commentCount: 45,
            sharedCount: 845,
          },
          buttons: [
            {
              title: '웹으로 보기',
              link: {
                mobileWebUrl: 'https://developers.kakao.com',
                webUrl: 'https://developers.kakao.com',
              },
            },
            {
              title: '앱으로 보기',
              link: {
                mobileWebUrl: 'https://developers.kakao.com',
                webUrl: 'https://developers.kakao.com',
              },
            },
          ],
        })
      }
    ; window.kakaoDemoCallback && window.kakaoDemoCallback() }
    catch(e) { window.kakaoDemoException && window.kakaoDemoException(e) }
    </script>
       
    </body>
    </html>


    전체 253 / 1 페이지
    전체 253 / 1 페이지



    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-04-19 18:45:40

    오늘의 홈 현황


    • 현재 접속자♨ 172 명
    • 오늘 가입자※ 2 명
    • 어제 가입자※ 7 명
    • 주간 가입자※ 16 명
    • 오늘 방문자 1,965 명
    • 어제 방문자 2,103 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,278,623 명
    • 전체 게시물※ 8,522 개
    • 전체 댓글수※ 24,482 개
    • 전체 회원수 10,912 명

    QR코드


    ☞ 사진기로 촬영하시면 방문링크 됩니다

    알림 0








    최신글↑