前面有个oauth2的类
回复内容: public function __construct(oauth2 $oauth, $root = 'sandbox')
前面有个oauth2的类
oauth2 $oauth 的意思是, 第一个参数 $oauth 需要是 类(class)oauth2的一个实例(new oauth2)
这 sdk 怎么一会 o 小写, 一会大写的.
能不能好好地看一下文档,再来提问?
https://github.com/cloudside/vdisksdk-php/blob/master/vdisk/vdisk.php#...
/** * 构造函数 * * @access public * @param oauth2 $oauth \vdisk\oauth2实例 * @param mixed $root 微盘容器的类型(basic or sandbox), 默认为sandbox * @return void */ public function __construct(oauth2 $oauth, $root = 'sandbox') { $this->oauth = $oauth; $this->setroot($root); }
实例:
http://vauth.appsina.com/doc/classes/vdisk.oauth2.html
新浪微盘 oauth 认证类(oauth2) vdisk\oauth2授权机制说明请参考文档:http://vdisk.weibo.com/developers/index.php?module=api&action=authinfo
