public function shareOneAction() { $socialCookie = $this->getSocialCookie(); if (!$socialCookie) { echo "login first"; } $request = new \Buzz\Message\Request(); $request->setHost('https://openapi.baidu.com'); $params = array("access_token" => $socialCookie['access_token'], "content" => "bigbang测试分享微博", "url" => "http://www.baidu.com"); $request->setResource("/social/api/2.0/share?" . http_build_query($params)); $response = new \Buzz\Message\Response(); $client = $this->getCurlClient(); $client->send($request, $response); if ($response->isOk()) { var_dump($response->getContent()); } else { echo "error"; } exit; }