3초기억력

javascript - 트위터, 페이스북 링크 보내기 ( 미투데이, 싸이월드 공감, 다음 요즘 등) 본문

플밍_기타

javascript - 트위터, 페이스북 링크 보내기 ( 미투데이, 싸이월드 공감, 다음 요즘 등)

잠수콩 2011. 1. 21. 17:44
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.



//트위터
function sendTwitter(sTitle,sUrl){
  var shref ="http://twitter.com/home?status="+encodeURIComponent(sTitle)+" "+encodeURIComponent(sUrl);
  var sWindow=window.open(shref);
  if (sWindow){
    sWindow.focus();
  }
}

//미투데이
function sendM2Day(sTitle,sUrl){
  var shref ="http://me2day.net/posts/new?new_post[body]"+encodeURIComponent(sTitle)+" "+encodeURIComponent(sUrl);
                                    //++"&new_post[tags]"+encodeURIComponent(sTag);
  var sWindow=window.open(shref);
  if (sWindow){
    sWindow.focus();
  }
}

//페이스북
function sendFacebook(sTitle,sUrl){
  var shref ="http://www.facebook.com/share.php?u="+encodeURIComponent(sUrl)+"&t="+encodeURIComponent(sTitle);
  var sWindow=window.open(shref);
  if (sWindow){
    sWindow.focus();
  }
}

//싸이월드 공감
function sendNateC(sTitle,sUrl,summary){
  var shref ="http://csp.cyworld.com/bi/bi_recommend_pop_euc.php?url="+encodeURIComponent(sUrl)+"&corpid=seoulshinmun&summary="+encodeURIComponent(summary)+"&title="+encodeURIComponent(sTitle);
  var sWindow=window.open(shref,'','menubar=no, toolbar=no, location=no, scrollbars=no');
  if (sWindow){
    sWindow.focus();
  }
}

//요즘
function sendDaum(sTitle,sUrl){
  var shref ="http://yozm.daum.net/api/popup/prePost?link="+encodeURIComponent(sUrl)+"&prefix="+encodeURIComponent(sTitle);
  var sWindow=window.open(shref, 'yozmSend', 'width=466, height=356');
  if (sWindow){
    sWindow.focus();
  }
}



Comments