본문 바로가기

프로그래밍/티스토리

[티스토리 스킨 만들기] 티스토리 sns 공유 버튼 만들기(텀블러, 네이버, 트위터, 페이스북)

728x90
반응형

[티스토리 스킨 만들기] 티스토리 sns 공유 버튼 만들기(텀블러, 네이버, 트위터, 페이스북)


 

 

원래는 현재 add 사이트를 통해서 간단하게 넣으면 되지만! 제가 만든게 더 의미있겠죠 ㅎㅎ

 

그래서 그냥 인터넷 보고 책도 뒤져보고 만들었습니다!!

 

<!--sns공유버튼-->

<a href="#" onclick="javascript:window.open('https://www.facebook.com/sharer/sharer.php?u=' +encodeURIComponent(document.URL)+'&t='+encodeURIComponent(document.title), 'facebooksharedialog', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600');return false;" target="_blank" alt="Facebook" id="gofacebook" style="display:scroll;position:fixed;bottom:520px;right:10px;z-index:99999999" title="페이스북 공유"><img src="./images/facebook.png" border="0"/></a>
	
<a href="#" onclick="javascript:window.open('https://twitter.com/intent/tweet?text=[%EA%B3%B5%EC%9C%A0]%20' +encodeURIComponent(document.URL)+'%20-%20'+encodeURIComponent(document.title), 'twittersharedialog', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=600');return false;" target="_blank" alt="Share on Twitter" id="gotwitter" style="display:scroll;position:fixed;bottom:460px;right:10px;z-index:99999999" title="트위터 공유"><img src="./images/twitter.png" border="0"/></a>

<a href="#" onclick="javascript:window.open('http://share.naver.com/web/shareView.nhn?url=' +encodeURIComponent(document.URL)+'&title='+encodeURIComponent(document.title), 'naversharedialog', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=800,width=600');return false;" target="_blank" alt="Naver" id="gonaver" style="display:scroll;position:fixed;bottom:400px;right:10px;z-index:99999999" title="네이버 공유"><img src="./images/naver2.png" border="0"/></a>
	
<a href="#" onclick="javascript:window.open('http://tumblr.com/widgets/share/tool?canonicalUrl='+encodeURIComponent(document.URL)+'&title='+encodeURIComponent(document.title), 'tumblrsharedialog', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=800,width=700');return false;" target="_blank" alt="tumblr" id="gotumblr" style="display:scroll;position:fixed;bottom:340px;right:10px;z-index:99999999" title="텀블러 공유"><img src="./images/tumblr2.png" border="0"/></a>

 

<head> ~ </head>사이에 넣으시면 됩니다.

 

 

이미지 쓰고 싶으신분은 쓰세요~

 

 

 

 

728x90
반응형