var share_sns_key = Array();share_sns_key['kakaotalk'] = ['5348e6e12e532a5760747042aff13025','f98a37fbefcaac142d048538f0ed5838']; jQuery(document).ready(function ($) { (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//developers.kakao.com/sdk/js/kakao.min.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'kakao-jssdk')); }); var kakao_init = false; function send_kakaotalk() { ka_app_id = share_sns_key['kakaotalk'][0]; if(!ka_app_id) { alert('카카오톡 공유가 설정되지 않았습니다'); return; } var bconnectURL = p_link; var ipath = "http://"+dom+"/magazine/sm-content/upload/"+user+"/magazine/"+smgid+"/"+nodeid+"/t1_"+title_img; var text = magzine_entitle+" "+post_sbj; if(!kakao_init){Kakao.init(ka_app_id); kakao_init = true;} Kakao.Link.sendDefault({ objectType: 'feed', content: { title: magzine_entitle, description: post_sbj, imageUrl:ipath, link: { mobileWebUrl: bconnectURL, webUrl:bconnectURL }, imageWidth : 200, imageHeight : 270 }, buttons:[ { title: post_des, link : { mobileWebUrl: bconnectURL, webUrl:bconnectURL } } ] }); $.ajax({ url : "http://"+dom+"/magazine/sm-include/sns_cnt.php?UserDumy="+user+"&smgid="+smgid+"&nodeid="+nodeid+"&sns_name=kakaotalk&par=get", dataType :"json", async: false, success: function(data) {}, error : function(e){} }); }