wunaozai

1.微信公众号测试帐号
  要开发公众号,就需要有一个公众号来进行开发测试。可以自己申请一个个人公众号,但是功能相比于企业公众号,功能弱了许多。不过微信提供了一个测试帐号给开发者。可以在 https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login 使用一个测试号,直接体验和测试公众平台所有高级接口。

2.配置公众号
  这里要记住 appID appsecret。还要配置URL Token 域名。我这里统一使用我自己的域名 http://wechat.wunaozai.com


 

3.配置frp内网映射工具
  由于微信公众号在开发过程中,也是要把服务放到外网的。但是我们一般在开发都是处于内网开发,这里使用frp工具把内网的端口映射到外网上去。这样方便开发。 https://github.com/fatedier/frp/ 也可以直接在 https://github.com/fatedier/frp/releases 这里下载二进制包。 详细的配置信息,参考官方文档
  服务器配置

1 # lmx @ wunaozai in /opt/frp/frp_0.20.0_linux_amd64 [15:48:17]
2 $ cat frps.ini
3 [common]
4 bind_port = 5555
5 vhost_http_port = 30000
6 
7 [web]
8 type=http
9 custom_domains = wechat.wunaozai.com

  客户端配置

1 [common]
2 server_addr = 39.108.130.13
3 server_port = 5555
4 
5 [web]
6 type = http
7 local_port = 8005
8 custom_domains = wechat.wunaozai.com
9 local_ip = 127.0.0.1


4.公众号开发工具包
  微信开发文档 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1445241432
  微信API测试工具 https://mp.weixin.qq.com/debug/cgi-bin/apiinfo
  基于微信的文档,然后自己通过HTTP请求,然后封装成工具包,也是可以实现。但是这些通用功能,已经有人把这些封装成一个开发工具包,通过Maven引入就可以用了。可以节省开发时间及调试API时间。
  微信开发工具包 https://github.com/Wechat-Group/weixin-java-tools

5.微信公众号开发工具
  微信Web开发者工具 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1455784140

 

本文地址:https://www.cnblogs.com/wunaozai/p/9848116.html

分类:

技术点:

相关文章: