私のコードを見てくれてありがとう。photobucketから不十分な権限の例外が発生します。以下にコードスニペットを配置しました。
try {
$key = '45435xxxx';
$sec = 'xxxx98989';
$api = new PBAPI($key, $sec);
$api->login('request')->post()->loadTokenFromResponse();
/*----- authToken and oauth_token_secret-------*/
$authToken=$api->getOAuthToken()->getKey();
$oauth_token_secret=$api->getOAuthToken()->getSecret();
/*--Autehnication--*/
$api->setOAuthToken($authToken, $oauth_token_secret,"ricolifts");
$api->setResponseParser('simplexml');
$response = $api->album('testalbum')->upload(array('type' => 'image', 'uploadfile' => '@'.$path, 'title' => 'my upload'))->post()->getResponseString();
var_dump($response);
}
catch (PBAPI_Exception_Response $e) {
echo "RESPONSE $e";
}
catch (PBAPI_Exception $e) {
echo "EX $e";
}
私が得ているエラーは次のとおりです。
Exception Insufficient permissions 9 xml POST 1328766775
私を助けてください。私が欠けているもの、または私のコードの何が間違っているのか。アップロード機能のパラメーターがありませんか?私が見逃している他の認証はありますか?サブドメインの役割はありますか?アルバム名としてtempを使用できますか?よろしくお願いします。再度、感謝します