예제 #1
0
 public function GetUserMessage($socServUserArray, $sinceId = '1')
 {
     $result = array();
     $token = false;
     $secret = false;
     if (!empty($socServUserArray)) {
         $hash = COption::GetOptionString("socialservices", "twitter_search_hash", "#b24");
         $appID = trim(self::GetOption("twitter_key"));
         $appSecret = trim(self::GetOption("twitter_secret"));
         if (is_array($socServUserArray[1]) && ($arToken = $socServUserArray[1])) {
             $key = array_rand($arToken, 1);
             $token = $arToken[$key];
             if (is_array($socServUserArray[2])) {
                 $secret = $socServUserArray[2][$key];
             }
         }
         $tw = new CTwitterInterface($appID, $appSecret, $token, false, $secret);
         $result = $tw->SearchByHash($hash, $socServUserArray, $sinceId);
     }
     return $result;
 }