- change according to weixinapi refactor
This commit is contained in:
@@ -78,7 +78,7 @@ func getSNSInfoFromCache(openID string) (wxUserinfo *weixinapi.SNSUserInfo, pass
|
||||
func GetWeiXinUserInfo(code string, state string) (userInfo *UserInfoExt, err error) {
|
||||
globals.SugarLogger.Debugf("GetUserInfo code:%s", code)
|
||||
if state == "" {
|
||||
token, err2 := api.WeixinAPI.SNSGetToken(code)
|
||||
token, err2 := api.WeixinAPI.SNSRetrieveToken(code)
|
||||
if err = err2; err == nil {
|
||||
wxUserinfo, err2 := api.WeixinAPI.SNSGetUserInfo(token.AccessToken, token.OpenID)
|
||||
if err = err2; err == nil {
|
||||
|
||||
Reference in New Issue
Block a user