We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func New(appId, appSecret string) *Message { message := &Message{ Request: Request{Token: ""}, AccessToken: AccessToken{AppId: appId, AppSecret: appSecret}, } // 要刷新token token, _ := message.AccessToken.Fresh() message.Request.Token = token return message }
The text was updated successfully, but these errors were encountered:
初始化应该在加一个参数,是否获取token,在创建菜单时需要初始化token 而进行消息回复不需要
Sorry, something went wrong.
func New(appId, appSecret string, refreshToken bool) *Message { message := &Message{ Request: Request{Token: ""}, AccessToken: AccessToken{AppId: appId, AppSecret: appSecret}, } //判定是否刷新token // 创建菜单需要刷新token // 自动消息回复不需要刷新token if refreshToken { token, _ := message.AccessToken.Fresh() message.Request.Token = token } return message }
原始传入的token是无用的
No branches or pull requests
func New(appId, appSecret string) *Message {
message := &Message{
Request: Request{Token: ""},
AccessToken: AccessToken{AppId: appId, AppSecret: appSecret},
}
// 要刷新token
token, _ := message.AccessToken.Fresh()
message.Request.Token = token
return message
}
The text was updated successfully, but these errors were encountered: