개발/JAVASCRIPT
[자바스크립트] SNS공유하기
료팡
2017. 3. 17. 15:05
function sendSNS(media) {
switch(media) {
case "tw":
sendUrl = "http://twitter.com/share?url="+$("#url").val()+"&count=none&text="+$("#title").val();
window.open(sendUrl,'트위터공유하기','width=600, height=400, toolbar=no, status=no,scrollbars=yes, resizable=no, top=0, left=0');
break;
case "fa":
sendUrl = "http://www.facebook.com/sharer.php?s=100&p[url]="+$("#url").val()+"&p[title]="+$("#title").val();
window.open(sendUrl,'페이스북공유하기', 'width=1024, height=600, toolbar=no, status=no,scrollbars=yes, resizable=no, top=0, left=0');
break;
}
}