public function __construct()
 {
     //フォロー動作有効になっているアカウント取得
     $AccountObj = new MS_Account();
     $this->Accounts = $AccountObj->getFollowValidAccount();
     $this->LogicObj = new Cron_Follower_Expand_Logic();
     $this->logFile = 'log_' . date("Y_m_d") . ".log";
 }
 public function __construct()
 {
     //リツイート動作有効になっているアカウント取得
     $AccountObj = new MS_Account();
     $this->Accounts = $AccountObj->getRetweetValidAccount();
     $this->LogicObj = new Cron_Tweets_Popularity_Logic();
     $this->logFile = 'log_' . date("Y_m_d") . ".log";
 }
 public function setAccountId($id)
 {
     $this->Account_ID = $id;
     //前のアカウント情報破棄
     if (!is_null($this->twObj)) {
         unset($this->twObj);
     }
     if (!is_null($this->AccountInfo)) {
         unset($this->AccountInfo);
     }
     $MS_AccountObj = new MS_Account();
     $this->AccountInfo = $MS_AccountObj->getAccountById($id);
     $this->twObj = new TwitterOAuth($this->AccountInfo->consumer_key, $this->AccountInfo->consumer_secret, $this->AccountInfo->access_token, $this->AccountInfo->access_token_secret);
     //DBよりパラメーター取得
     //$this->DBgetFollowParm();
 }
 public function setAccountId($id)
 {
     $this->Account_ID = $id;
     //前の情報破棄
     if (!is_null($this->twObj)) {
         unset($this->twObj);
     }
     if (!is_null($this->AccountInfo)) {
         unset($this->AccountInfo);
     }
     $MS_AccountObj = new MS_Account();
     $this->AccountInfo = $MS_AccountObj->getAccountById($id);
     $this->twObj = new TwitterOAuth($this->AccountInfo->consumer_key, $this->AccountInfo->consumer_secret, $this->AccountInfo->access_token, $this->AccountInfo->access_token_secret);
     //初期設定取得
     $this->DBgetInitInfo();
 }
Example #5
0
require_once "../conf.php";
require_once _TWITTER_CLASS_PATH . "Cron_Follower_ExRemove_Logic.php";
require_once _TWITTER_CLASS_PATH . "MS_Account.php";
require_once _TWITTER_CLASS_PATH . "DB_Base.php";
if (!isset($_REQUEST['id'])) {
    exit;
}
if (is_numeric($_REQUEST['id'])) {
    $AccountID = $_REQUEST['id'];
} else {
    echo 'idが不正';
    exit;
}
$ExRemove_logic = new Cron_Follower_ExRemove_Logic();
//リツイート動作有効になっているアカウント取得
$AccountObj = new MS_Account();
$Account = $AccountObj->getAccountById($AccountID);
$mes = date("Y-m-d H:i:s") . " test_exremove: " . $Account->account_name . " 処理開始\n";
error_log($mes, 3, _TWITTER_LOG_PATH . 'log_' . date("Y_m_d") . ".log");
//ロジックにアカウントセット
$ExRemove_logic->setAccountId($Account->id);
try {
    //対象を取得しDBへセット
    $ExRemove_logic->getTargetUserAndSetDB();
    //リムーブ処理
    $ExRemove_logic->execRemove();
} catch (Exception $e) {
    //ログ出力
    error_log($e->getMessage(), 3, _TWITTER_LOG_PATH . 'log_' . date("Y_m_d") . ".log");
}
$mes = date("Y-m-d H:i:s") . " test_exremove: " . $Account->account_name . " 処理終了\n";
 private function getTwAccountInfo($twitter_account_id)
 {
     $AccountObj = new MS_Account();
     return $AccountObj->getAccountById($twitter_account_id);
 }
Example #7
0
 private function getTwAccountInfo()
 {
     $AccountObj = new MS_Account();
     $this->Tw_Account_Info = $AccountObj->getAccountById($this->Site_Info->twitter_account_id);
 }