I try to create a private version and therefore I used something like this in php:
var scribd_doc = scribd.Document.getDoc( 28394353, 'xxx');
scribd_doc.addParam("use_ssl", true);
scribd_doc.addParam('public', false);
scribd_doc.grantAccess("cbccf6e7-1ff7-9034-8a7c-a0c2a5b225ed", <?php echo "'" . trim($_COOKIE['PHPSESSID']) . "'" ?>, <?php echo "'" . scribd_calculate_signature($documentID = '28394353',
$sessionID = trim($_COOKIE['PHPSESSID']),
$userID = "cbccf6e7-1ff7-9034-8a7c-a0c2a5b225ed") . "'" ?>);
...
...
scribd_doc.write( 'embedded_flash' );
Which is the api of scribd for javascript with the addition of the signature. My result is the "Security failure - This is not a secure document but has security embed parameters" Error, which is not well documented. The document is set to private.
The code that uploaded it (and therefore the php tag in the question) is the following:
require_once 'scribd.php';
$scribd_api_key = "api-key";
$scribd_secret = "api-secret";
$scribd = new Scribd($scribd_api_key, $scribd_secret);
/**
* Upload a document from a file
*/
$file = 'notion_learning_info_sheet_2010.pdf'; //a reference to the file in reference to the current working directory.
$doc_type = null;
$access = 'private';
$rev_id = null;
$data = $scribd->upload($file, $doc_type, $access, $rev_id); // returns Array ( [doc_id] => 1026598 [access_key] => key-23nvikunhtextwmdjm2i )
print_r($data);
Any ideas?