0
我使用这个PHP类box.com https://github.com/golchha21/BoxPHPAPIBox.com共享链接文件夹
我已经作出了自己的功能共享文件夹这样
public function share_folder($folder_id) {
$url = $this->build_url("/folders/".$folder_id);
$params = array('shared_link' => array('access' => 'open', 'permissions' =>
array('can_download' => 'true', 'can_preview' => 'true')));
return json_decode($this->post($url, json_encode($params)), true);
}
我有与此帖相同的问题。 Access denied error message when trying to create a shared link to a folder in Box
有没有人有此修复或知道为什么会发生?
更新
我想通了:
public function share_folder($folder_id) {
$url = $this->build_url("/folders/".$folder_id);
$params = array('shared_link' => array('access' => 'open', 'permissions' =>
array('can_download' => true, 'can_preview' => true)));
return json_decode($this->put($url, $params), true);
我必须改变它把脱下的json_encode
希望这有助于别人