public function sendMsgAll(){
$access_token = $this->getWxAccessToken();
dump($access_token);
$url ="https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=".$access_token['access_token'];
dump($url);
//2,组装群发接口数据array
if(S('user_info2')){
$openid = S('user_info2');
dump($openid);
}
$array = array(
"touser"=>"oi3SNxxdDQGOVOvdKC9tvRx05ou2x8",
'text' => array('content'=>'xiaojiahaohaoxuexi'),
'msgType'=>'text'//消息类型
);
//3,将array->json
$postJson = json_encode('$array');
dump($postJson);
//4,调用curl
$res = $this->http_curl2($url,'post','json',$postJson);
dump($res);
}array(2) {["errcode"] => int(45009)
["errmsg"] => string(55) "reach max api daily quota limit hint: [fPD8Qa0401vr44!]"
}
最佳答案