微信公众平台自定义菜单及高级接口PHP SDK_PHP教程
程序员文章站
2022-04-08 08:56:51
...
本文介绍介绍微信公众平台自定义菜单及高级接口的PHP SDK及使用方法。
作者
方倍工作室
修正记录:
2014.05.03 v1.0
SDK 源码:
= "" = ""
__construct( = , = ( ->appid = ( ->appsecret =
->lasttime = 1395049256 ->access_token = "nRZvVpDU7LxcSi7GnG2LrUcmKbAECzRf0NyDBwKlng4nMPf88d34pkzdNcvhqm4clidLGAS18cN1RTSK60p49zIZY4aO13sF-eqsCs0xjlbad-lKVskk8T7gALQ5dIrgXbQQ_TAesSasjJ210vIqTQ"
(() > (->lasttime + 7200 = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".->appid."&secret=".-> = ->https_request( = json_decode(,
->access_token = ["access_token" ->lasttime =
get_user_list( = = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=".->access_token."&next_openid=". = ->https_request( json_decode(,
get_user_info( = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=".->access_token."&openid=".."&lang=zh_CN" = ->https_request( json_decode(,
create_menu( = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=".-> = ->https_request(, json_decode(,
send_custom_message(, , = ('touser' => ( 'text':
['msgtype'] = 'text' ['text'] = ('content'=> ( = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=".-> ->https_request(, (json_encode(
create_qrcode(,