【发布时间】:2012-06-28 18:55:05
【问题描述】:
我在 PHP.net 中使用 OAuth::fetch() 示例 (Outh code。我使用的 cod 是
<?PHP
try{
$oauth = new OAuth("consumer_key","consumer_secret",OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_AUTHORIZATION);
$oauth->setToken("access_token","access_token_secret");
$oauth->fetch("http://photos.example.net/photo?file=vacation.jpg");
$response_info = $oauth->getLastResponseInfo();
header("Content-Type: {$response_info["content_type"]}");
echo $oauth->getLastResponse();
} catch(OAuthException $E) {
echo "Exception caught!\n";
}?>
错误信息是
致命错误:在第 3 行的 C:\wamp\www\Jesvin\MyTest1\test1.php 中找不到类“OAuth”
【问题讨论】:
标签: php api authentication oauth