fastwego / offiaccount Goto Github PK
View Code? Open in Web Editor NEW[微信公众号] A fast wechat offiaccount development sdk written in Golang
Home Page: https://fastwego.dev
License: Other
[微信公众号] A fast wechat offiaccount development sdk written in Golang
Home Page: https://fastwego.dev
License: Other
公众平台将于2022年2月28日下线新增永久图文素材接口和修改永久图文素材接口。
相关文档 https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Add_draft.html
附永久图文素材接口下线后的解决办法:可参照 material 函数自行构造新接口
material.MediaUploadImg返回Status 412 Precondition Failed
我目前只看了关于发送模板消息这块代码,关于发送模板消息时,源码直接拼接access_token去请求微信服务器,一次失败后就不管了,直接抛出异常;
我觉得这样设计有点不好,原因是:
源码点:
https://github.com/fastwego/offiaccount/blob/master/client.go#L119
关于上述描述,都只是个人经验而言,并未采用该项目实地测试,建议在涉及acces-token请求的地方采用重试机制(retry)+刷新access-token的机制,保证请求成功的概率,微信对这块的acces-token失效有实际的错误码返回,可参考
EchoStr中进行了签名检查,但是收到POST后直接进行ParseXML了,应该先进行和EchoStr一样的签名检查,通过后再ParseXML
请教个问题,我的中控服务器有很多个号的access_token,我在业务中也需要多个号切换,请问这种情况下从中控服务器获取access_token的代码应该怎么写呢?
源码中依旧含有fmt打印输出哦,亲
如:
https://github.com/fastwego/offiaccount/blob/master/server.go#L95
建议辛苦下再整体清理下调试信息,谢谢, 感谢付出。。。
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[news]]></MsgType>
<ArticleCount>1</ArticleCount>
<Articles>
<Item>
<Title><![CDATA[title1]]></Title>
<Description><![CDATA[description1]]></Description>
<PicUrl><![CDATA[picurl]]></PicUrl>
<URL><![CDATA[url]]></URL>
</Item>
</Articles>
Item、URL不对
这样解析不出来,不属于event事件。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.