Home  >  Article  >  Backend Development  >  使用新浪SDK.公布带图片的微博

使用新浪SDK.公布带图片的微博

WBOY
WBOYOriginal
2016-06-13 12:33:231018browse

使用新浪SDK.发布带图片的微博
这是发布的代码
 $params = array(
        'content' => '测试发表一条图片微博'
    );
$url = 'C:\\MyNews\\qq\\logo.png';//url
$img_name = basename($url);
$img_type = getimagesize($url);
    $multi =array("pic"=>array(
'type' => "image/jpeg",
'name' => "logo.png",
'data' => file_get_contents("C://MyNews/qq/logo.png")));
    $r = Tencent::api('t/add_pic', $params, 'POST', $multi);
    echo $r;
发布后,没有任何返回,已经开启调试模式!分不多,望谅解!
是图片的问题么?怎么改?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn