function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { self::$sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); self::$consumer = new OAuthConsumer($consumer_key, $consumer_secret); self::$token = NULL; if (!empty($oauth_token) && !empty($oauth_token_secret)) { self::$token = new OAuthConsumer($oauth_token, $oauth_token_secret); } }