wizjin / weixin Goto Github PK
View Code? Open in Web Editor NEWWeixin MP Go Library
License: MIT License
Weixin MP Go Library
License: MIT License
如题。
完整信息 json: cannot unmarshal number 445263598701395969 into Go struct field .msgid of type int32
Lines 763 to 768 in e9f0f20
原因在于int32 不能包含 445263598701395969
,它也比较解决 int64 的最大值
https://golang.org/pkg/encoding/json/#Number 可能是最后的解决方案
不支持aes加密吗?
Method: Post
URL: https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=TOKEN
QR Scene Body:
{
"expire_seconds": 1800,
"action_name": "QR_SCENE",
"action_info": {
"scene": {
"scene_id": 123
}
}
}
PS. scene_id max 100000
QR Limit Scene Body:
{
"action_name": "QR_LIMIT_SCENE",
"action_info": {
"scene": {
"scene_id": 123
}
}
}
PS. scene_id max 1000
Result:
{
"ticket":"<QR Code Ticket>",
"expire_seconds":1800
}
如何把这个包放在beego里使用,给个示例代码,谢谢.
添加上传Media文件功能
noncestr := fmt.Sprintf("%d", c.randreader.Int())
what is the point of the above sentence?
多媒体文件下载的时候 Content-Type: text/plain以外的情况下:
只返回r.Body(其他类型的处理好像也都是只返回r.Body).
同样的是多媒体类型之图片的时候,没法判断获取的内容是什么类型的文件.
比如jpg/png就无法区分,但是又要在开始的时候创建文件.
// Button type
MenuButtonTypeKey = "click"
MenuButtonTypeUrl = "view"
这个是不是应该是
MenuButtonTypeKey = "CLICK"
MenuButtonTypeUrl = "VIEW"
如题,怎么和github.com/gin-gonic/gin集成
如题
Method: Get
URL: https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=TICKET
Response: image/jpg
PS. TICKET need UrlEncode
应该是协程没有起来,chan 被阻塞的原因
https://github.com/wizjin/weixin/blob/master/weixin.go#L363-L368
Json lib will encoding the "&" to \u0026 , so if you want to create openauth url like:
https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
That will cause the CreateMenu fail.
The related code:
https://github.com/wizjin/weixin/blob/master/weixin.go#L418
I've got quick-and-dirty patch by repalce it to "&"
https://github.com/imzjy/weixin/blob/master/weixin.go#L391
Maybe there is good way to fix it, just hightlight the issue here.
现在github tag上面只有0.4.0 及其以下的
mux := weixin.New("tk_wx_xxx", "", "")
mux.HandleFunc(weixin.MsgTypeText, Echo)
http.Handle("/wx/signature", mux)
func Echo(w weixin.ResponseWriter, r *weixin.Request) {
txt := r.Content // 获取用户发送的消息
w.ReplyText(txt) // 回复一条文本消息
w.PostText("Post:" + txt) // 发送一条文本消息
}
我的这个地址 会报404错误
在集群环境下,Token是需要进行集中化管理的,而现在的这种模式,我觉得做集中化管理比较困难把~能不能有办法解决呢?
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.