微信公众号
2017-01-17 19:23
148 查看
获取全局 的access_token:把下面的appid,secre 换成自己的。,然后回车,就得到了。每过7200秒会失效,,,然后粘贴底部菜单代码即可
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
网页授权:access_token和access_token有区别需注意,,拿到此access_token和openid来获取用户信息
{ "button": [ { "type": "click", "name": "今日歌曲", "key": "V1001_TODAY_MUSIC" }, { "name": "菜单", "sub_button": [ { "type": "view", "name": "搜索", "url": "http://www.soso.com/" }, { "type": "view", "name": "授权", "url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=自己的appid&redirect_uri=【这里是转码之后的地址】https%3A%2F%2Fliupandeng123.applinzi.com%2Fh10demo%2FgetUserinfo.php&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect" }, { "type": "click", "name": "赞一下我们", "key": "V1001_GOOD" } ] } ]}
在php中转码:
<?php$url = "这里是填自己的服务器地址https://1.xiasize.applinzi.com/h10demo/getUserinfo.php";$url = urlencode($url);echo $url;?>
相关文章推荐
- 微信公众号开发(Java) ---- 客服消息发送
- 微信公众号支付
- 微信公众号添加客服素材-微信公众号使用教程20
- 微信公众号支付调用chooseWXPay提示“errmsg choosewxpay fail”
- 微信公众号开发(零)初期准备工作
- 微信公众号上传图片接口
- 微信公众号实现机器人回复
- 微信公众号开发(二)获取用户信息
- 福利丨微信公众号“人工智能爱好者俱乐部”留言赠书活动结果公布(第三季)
- 从零开发微信公众号系列 【一】账号准备及公众号类型简介
- 微信公众号模板消息实现------遇到问题Token为null,报空指针
- 如何搭建健身房教练私教器材设备微信公众号预约系统
- 使用内网开发微信公众号
- 微信公众号的搭建-第五天-自定义菜单
- java版 微信公众号获取微信用户基本信息
- 微信公众号如何运营?公众平台推广技巧
- 微信公众号支付(二)下单支付
- Python微信公众号
- 微信公众号开发1
- 微信公众号中ip白名单用谁的ip