示例#1
0
 public function __construct($appID = false, $appSecret = false, $token = false, $tokenVerifier = false, $tokenSecret = false)
 {
     if ($appID === false) {
         $appID = trim(CSocServTwitter::GetOption("twitter_key"));
     }
     if ($appSecret === false) {
         $appSecret = trim(CSocServTwitter::GetOption("twitter_secret"));
     }
     $this->httpTimeout = SOCSERV_DEFAULT_HTTP_TIMEOUT;
     $this->appID = $appID;
     $this->appSecret = $appSecret;
     $this->token = $token;
     $this->tokenVerifier = $tokenVerifier;
     if ($this->token && isset($_SESSION["twitter_token_secret"])) {
         $this->tokenSecret = $_SESSION["twitter_token_secret"];
     }
     if ($this->token && $tokenSecret) {
         $this->tokenSecret = $tokenSecret;
     }
 }