#91 에 따른 sns 공유 기능 추가

This commit is contained in:
chicpro
2013-05-02 16:14:55 +09:00
parent 5c2a585bbd
commit 4fd3c33fde
6 changed files with 67 additions and 17 deletions

30
shop/sns_send.php Normal file
View File

@ -0,0 +1,30 @@
<?php
include_once('./_common.php');
$url = $_REQUEST['url'];
$title = str_replace('\"', '"',$_REQUEST['title']);
$title_url = $title.' : '.$url;
//$title = strcut_utf8($title, 140);
switch($_REQUEST['sns']) {
case 'facebook' :
header("Location:http://www.facebook.com/sharer/sharer.php?s=100&p[url]=".$url."&p[title]=".$title);
break;
case 'twitter' :
header("Location:http://twitter.com/home?status=".$title_url);
break;
case 'me2day' :
header("Location:http://me2day.net/posts/new?new_post[body]=".$title_url);
break;
case 'yozm' :
header("Location:http://yozm.daum.net/api/popup/prePost?sourceid=41&prefix=".$title_url);
break;
case 'google' :
header("Location:https://plus.google.com/share?url=".$url);
break;
default :
echo 'Error';
break;
}
?>