新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
php怎么實(shí)現(xiàn)微信增加菜單
本文操作環(huán)境:windows7系統(tǒng)、php7.1版、DELL G3電腦

php 怎么實(shí)現(xiàn)微信增加菜單?
PHP實(shí)現(xiàn)創(chuàng)建微信自定義菜單的方法示例
具體如下:
在使用通用接口前,你需要做以下兩步工作:
1.擁有一個(gè)微信公眾賬號(hào),并獲取到appid和appsecret(在公眾平臺(tái)申請(qǐng)內(nèi)測(cè)資格,審核通過后可獲得)
2.通過獲取憑證接口獲取到access_token
注意:
access_token是第三方訪問api資源的票據(jù);
access_token對(duì)應(yīng)于公眾號(hào)是全局唯一的票據(jù),重復(fù)獲取將導(dǎo)致上次獲取的access_token失效。
訪問下面這個(gè)地址(注意替換你的appid和secret):
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
然后在瀏覽器能看到一下返回信息:
{"access_token":"這里就是你的access_token","expires_in":7200}
創(chuàng)建自定義菜單:
文章標(biāo)題:php怎么實(shí)現(xiàn)微信增加菜單
文章源于:http://fisionsoft.com.cn/article/ccecoig.html


咨詢
建站咨詢
