<?
//-- SNS 정보 구하기 ---------------------------- terrorboy of sir.co.kr

if($g4[https_url]) {
	$sns_site_url	= $g4[https_url];
}else{
	$sns_site_url	= $g4[url];
}

//-- EUC --> UTF 설정후 전송 --------------------
if($g4['charset'] == "euc-kr") {
	$sns_subject	= iconv('euc-kr', 'utf-8',$view[wr_subject]);
	$sns_me2_tag	= iconv('euc-kr', 'utf-8',$g4['title']);
}else{
	$sns_subject	= $view[wr_subject];
	$sns_me2_tag	= $g4['title'];									//-- 테그 부분에 현재 글 위치 표시
}
$sns_subject		= urlencode($sns_subject);

//-- 현제 페이지 주소 추출 ----------------------
if($trackback_url)	$sns_board_url		= urlencode($trackback_url);
else				$sns_board_url		= urlencode($sns_site_url . "?tcd=".$tcd."&wr_id=".$wr_id);

//-- 페이스북 -----------------------------------
$sns_face_url		= $sns_board_url;
$sns_face_subject	= $sns_subject;
$sns_face_content	= strip_tags($view[wr_content]); 
$sns_face_content	= urlencode(cut_str($sns_face_content, 150));
if($view[file][0][file]){
	if($g4[https_url]) {
		$sns_face_img = $g4[https_url]."/data/file/".$bo_table."/".$view[file][0][file]; // 1번째 사진을 기본 썸네일로 지정
	}else{
		$sns_face_img = $g4[url]."/data/file/".$bo_table."/".$view[file][0][file];
	}
	//$sns_face_img = urlencode($sns_face_img);
}

//-- 트위터 -------------------------------------
$sns_twt_txt		= $sns_subject . " " . $sns_board_url;

//-- 미투데이 -----------------------------------
$sns_me2_txt		= $sns_subject . " " . $sns_board_url;

//-- 요즘 ---------------------------------------
$sns_yozm_url		= $sns_board_url;
$sns_yozm_subject	= $sns_subject;
$sns_yozm_img		= $sns_face_img;
?>