Using PHP GMail OAuth Library/Sample.
$options = array(
'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER,
'version' => '1.0',
'consumerKey' => $THREE_LEGGED_CONSUMER_KEY,
'callbackUrl' => getCurrentUrl(),
'requestTokenUrl' => 'https://www.google.com/accounts/OAuthGetRequestToken',
'userAuthorizationUrl' => 'https://www.google.com/accounts/OAuthAuthorizeToken',
'accessTokenUrl' => 'https://www.google.com/accounts/OAuthGetAccessToken'
);
Here's the error: Parse error: syntax error, unexpected ',', expecting '(' This is from line 77: the 'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER, line, any ideas?
Edit: I'm using PHP 4.4.8
You're using PHP 4, which does not support class constants; when it sees code like that, it's expecting a static function call, which it does support:
Class::static_function()
However, in the case of your code, the Zend_Oauth
class has a const REQUEST_SCHEME_HEADER
, a PHP 5-only feature, which is accessed like so:
Zend_Oauth::REQUEST_SCHEME_HEADER
This is why Zend Framework requires PHP 5. If you intend to use it, yes you'll need to contact your hosting provider to see if they offer PHP 5 as an option or something.
It looks like you are running PHP4.
Most likely your server has both php5 and php4 installed, but it defaults to php4. Contact your server provider.