Merge branch 'g5'
This commit is contained in:
@ -12,12 +12,6 @@ switch($_REQUEST['sns']) {
|
||||
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 'gplus' :
|
||||
header("Location:https://plus.google.com/share?url=".$short_url);
|
||||
break;
|
||||
|
||||
@ -160,7 +160,6 @@ if ($w == 'c') // 댓글 입력
|
||||
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||
wr_facebook_user = '$wr_facebook_user',
|
||||
wr_twitter_user = '$wr_twitter_user',
|
||||
wr_me2day_user = '$wr_me2day_user',
|
||||
wr_1 = '$wr_1',
|
||||
wr_2 = '$wr_2',
|
||||
wr_3 = '$wr_3',
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if (!$board['bo_use_sns']) return;
|
||||
|
||||
set_cookie('ck_facebook_checked', false, 86400*31);
|
||||
set_cookie('ck_twitter_checked' , false, 86400*31);
|
||||
set_cookie('ck_me2day_checked' , false, 86400*31);
|
||||
|
||||
//============================================================================
|
||||
// 페이스북
|
||||
@ -52,7 +51,7 @@ $wr_twitter_user = "";
|
||||
if ($_POST['twitter_checked']) {
|
||||
include_once(G5_SNS_PATH."/twitter/twitteroauth/twitteroauth.php");
|
||||
include_once(G5_SNS_PATH."/twitter/twitterconfig.php");
|
||||
|
||||
|
||||
if ( !(empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) ) {
|
||||
$post = googl_short_url($comment_url).' '.$wr_content;
|
||||
$post = utf8_strcut($post, 140);
|
||||
@ -61,30 +60,11 @@ if ($_POST['twitter_checked']) {
|
||||
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);
|
||||
// 등록
|
||||
$connection->post('statuses/update', array('status' => $post));
|
||||
|
||||
|
||||
set_cookie('ck_twitter_checked', true, 86400*31);
|
||||
}
|
||||
|
||||
$wr_twitter_user = get_session("ss_twitter_user");
|
||||
}
|
||||
//============================================================================
|
||||
|
||||
|
||||
//============================================================================
|
||||
// 미투데이
|
||||
//----------------------------------------------------------------------------
|
||||
$wr_me2day_user = "";
|
||||
if ($_POST['me2day_checked']) {
|
||||
if (!empty($_SESSION['me2day']['user_id']) && !empty($_SESSION['me2day']['user_key'])) {
|
||||
$user_id = $_SESSION['me2day']['user_id'];
|
||||
$user_key = $_SESSION['me2day']['user_key'];
|
||||
$auth_key = "12345678" . md5("12345678" . $user_key);
|
||||
$result = file_get_contents("http://me2day.net/api/create_post/{$user_id}.json?uid={$user_id}&ukey={$auth_key}&akey=".$config['cf_me2day_key']."&post[body]=".urlencode($wr_content));
|
||||
|
||||
set_cookie('ck_me2day_checked', true, 86400*31);
|
||||
}
|
||||
|
||||
$wr_me2day_user = get_session("ss_me2day_user");
|
||||
}
|
||||
//============================================================================
|
||||
?>
|
||||
Reference in New Issue
Block a user