I am working on an app that will upload images to my smugmug account. I am using phpSmug 3.4 and the following code:
require_once( "phpSmug.php" );
try {
//assign Variable to smugmug
$f = new phpSmug("APIKey=*****************", "AppName=Test/1.0");
// Login Anonymously
$f->login();
$f->images_upload("AlbumID=2282300", "File=TestPic.jpg");
}
catch ( Exception $e ) {
echo "{$e->getMessage()} (Error Code: {$e->getCode()})";
}
?>
but I get back:
SmugMug API Error for method image_upload: missing required parameter (Error Code: 22)
Do I have to use Oauth to upload, or can it be done anonymously? Is my syntax wrong?