config.php push 안되는 문제로 twitter/config.php 를 twitter/twitterconfig.php 로 파일명 변경
This commit is contained in:
@ -49,7 +49,7 @@ if ($_POST['facebook_checked']) {
|
||||
//----------------------------------------------------------------------------
|
||||
if ($_POST['twitter_checked']) {
|
||||
include_once(G4_SNS_PATH."/twitter/twitteroauth/twitteroauth.php");
|
||||
include_once(G4_SNS_PATH."/twitter/config.php");
|
||||
include_once(G4_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;
|
||||
|
||||
@ -10,7 +10,7 @@ include_once("./_common.php");
|
||||
/* Start session and load lib */
|
||||
//session_start();
|
||||
require_once(G4_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
|
||||
require_once(G4_SNS_PATH.'/twitter/config.php');
|
||||
require_once(G4_SNS_PATH.'/twitter/twitterconfig.php');
|
||||
|
||||
//print_r2($_SESSION); print_r2($_REQUEST); exit;
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ include_once("./_common.php");
|
||||
/**
|
||||
* Exit with an error message if the CONSUMER_KEY or CONSUMER_SECRET is not defined.
|
||||
*/
|
||||
require_once(G4_SNS_PATH.'/twitter/config.php');
|
||||
require_once(G4_SNS_PATH.'/twitter/twitterconfig.php');
|
||||
if (CONSUMER_KEY === '' || CONSUMER_SECRET === '' || CONSUMER_KEY === 'CONSUMER_KEY_HERE' || CONSUMER_SECRET === 'CONSUMER_SECRET_HERE') {
|
||||
echo 'You need a consumer key and secret to test the sample code. Get one from <a href="https://dev.twitter.com/apps">dev.twitter.com/apps</a>';
|
||||
exit;
|
||||
|
||||
@ -9,7 +9,7 @@ include_once("./_common.php");
|
||||
/* Load required lib files. */
|
||||
//session_start();
|
||||
require_once(G4_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
|
||||
require_once(G4_SNS_PATH.'/twitter/config.php');
|
||||
require_once(G4_SNS_PATH.'/twitter/twitterconfig.php');
|
||||
|
||||
/* If access tokens are not available redirect to connect page. */
|
||||
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {
|
||||
|
||||
@ -4,7 +4,7 @@ include_once("./_common.php");
|
||||
/* Start session and load library. */
|
||||
//session_start();
|
||||
require_once(G4_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
|
||||
require_once(G4_SNS_PATH.'/twitter/config.php');
|
||||
require_once(G4_SNS_PATH.'/twitter/twitterconfig.php');
|
||||
|
||||
/* Build TwitterOAuth object with client credentials. */
|
||||
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
|
||||
|
||||
10
plugin/sns/twitter/twitterconfig.php
Normal file
10
plugin/sns/twitter/twitterconfig.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* A single location to store configuration.
|
||||
*/
|
||||
|
||||
define('CONSUMER_KEY', $config['cf_twitter_key']);
|
||||
define('CONSUMER_SECRET', $config['cf_twitter_secret']);
|
||||
//define('OAUTH_CALLBACK', G4_SNS_URL.'/twitter/callback.php');
|
||||
define('OAUTH_CALLBACK', '');
|
||||
@ -48,7 +48,7 @@ if (!$board['bo_use_sns']) return;
|
||||
//----------------------------------------------------------------------------
|
||||
if ($config['cf_twitter_key']) {
|
||||
include_once(G4_SNS_PATH."/twitter/twitteroauth/twitteroauth.php");
|
||||
include_once(G4_SNS_PATH."/twitter/config.php");
|
||||
include_once(G4_SNS_PATH."/twitter/twitterconfig.php");
|
||||
|
||||
$twitter_user = false;
|
||||
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {
|
||||
|
||||
Reference in New Issue
Block a user