我正在使用此代码对magento上的用户进行身份验证
$redirecturi = 'http://localhost/magento';
$temporaryCredentialsRequestUrl = "http://localhost/magento/oauth/initiate?oauth_callback=".$redirecturi;
$customerAuthorizationUrl = 'http://localhost/magento/oauth/authorize';
$accessTokenRequestUrl = 'http://localhost/magento/oauth/token';
$oauthClient = new OAuth($consumerkey, $consumersecret, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);
$oauthClient->enableDebug();
$requestToken = $oauthClient->getRequestToken($temporaryCredentialsRequestUrl);
header('Location: '.$customerAuthorizationUrl.'?oauth_token='.$requestToken['oauth_token']);
exit(0);
但它显示致命错误,例如'未找到'Class'OAuth''。我使用此链接进行身份验证magento authentication。 请查看并回复答案。
谢谢..
答案 0 :(得分:1)
请检查您是否安装了OAUth Extension for PHP。见http://www.php.net/manual/en/oauth.installation.php
答案 1 :(得分:0)