https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1443433542
/**
* 微信生成二维码
*/
public function share_by_wx_code(){
$a = new IndexController();
$access_token = $a->getSessionAccessToken();
$qrcode = '{"expire_seconds": 1800, "action_name": "QR_SCENE", "action_info": {"scene": {"scene_id": 10000}}}';
$url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=".$access_token;
$result =$a->postcurl($url,$qrcode);
$ticket = $result["ticket"];
$url_ticket="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=$ticket";
return $url_ticket;
}
说明:
临时二维码请求说明