微信公众号开发之群发消息(三)
public function massSend(){
// $postField=\'{
// "filter":{
// "group_id":"0"
//},
// "text":{
// "content":"您有一个新咨询,请您及时处理"
// },
// "msgtype":"text"
//}\';
$postField=\'{
"filter":{
"is_to_all":false
"group_id":"2"
},
"text":{
"content":"CONTENT"
},
"msgtype":"text"
}\';
$url= \'https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=\'.$this->ACCESS_TOKEN;//群发消息接口
$ret=$this->JsonPost($url, json_encode($postField));
echo json_encode($ret);
}