我正在使用具有功能的OAuth类
class OAuth {
public __construct ( string $consumer_key , string $consumer_secret [, string $signature_method = OAUTH_SIG_METHOD_HMACSHA1 [, int $auth_type = 0 ]] )
public bool enableDebug ( void )
public array getRequestToken ( string $request_token_url [, string $callback_url ] )
}
我称之为
$oauthClient = new OAuth($consumerKey, $consumerSecret, OAUTH_SIG_METHOD_HMACSHA1, $authType);
$oauthClient->enableDebug();
if (!isset($_GET['oauth_token']) && !$_SESSION['state']) {
$requestToken = $oauthClient->getRequestToken($temporaryCredentialsRequestUrl);
$_SESSION['secret'] = $requestToken['oauth_token_secret'];
$_SESSION['state'] = 1;
header('Location: ' . $adminAuthorizationUrl . '?oauth_token=' . $requestToken['oauth_token']);
exit;
}
给出错误
Parse error: syntax error, unexpected '__construct' (T_STRING), expecting variable (T_VARIABLE)
disableDebug的错误
Parse error: syntax error, unexpected 'bool' (T_STRING), expecting variable (T_VARIABLE)
请帮忙解决问题