有没有人帮忙看看啥问题
微信登录接口返回100086错误,错误提示:invalud code decode fail?我在微信打开如下链接: https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa9dcb46169680d66&redirect_uri=https%3A%2F%2Fpdf.fusetools.com.cn%2Fqqc.php&response_type=code&scope=snsapi_base&state=1#wechat_redirect 没有预期的弹出 获取用户信息 授权提示,而是返回了一个 code_error:100068 code_msg :invalid code, decode fail 这个错误码在公众号微信网页授权说明页是没有的: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html 在线等,有人碰到过吗 【已解决】 回调地址弄错了 用了qq登录的回调地址导致的,改成微信公众号的就可以了, 代码如下: <?php header("Content-Type: text/html;charset=utf-8"); $appid = "xxx"; $secret = "xxxx"; $code = $_GET["code"]; $get_token_url = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid='.$appid.'&secret='.$secret.'&code='.$code.'&grant_type=authorization_code'; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$get_token_url); curl_setopt($ch,CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); $res = curl_exec($ch); curl_close($ch); $json_obj = json_decode($res,true); //根据openid和access_token查询用户信息 $access_token = $json_obj['access_token']; $openid = $json_obj['openid']; $get_user_info_url = 'https://api.weixin.qq.com/sns/userinfo?access_token='.$access_token.'&openid='.$openid.'&lang=zh_CN'; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$get_user_info_url); curl_setopt($ch,CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); $res = curl_exec($ch); curl_close($ch); //解析json $user_obj = json_decode($res,true); $_SESSION['user'] = $user_obj; print_r($user_obj); ?>
2022-03-06现在还有办法获取关注用户的头像和昵称吗
公众号"关注后用户信息获取接口"调整的问题?[图片] 1、这个调整的接口只是 https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html 这个关注后用户信息获取接口(获取用户列表),后续返回空值? 2、用户授权接口https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html本次有调整吗?是否还可以授权后拉取用户信息? 3、调整的接口生效时间是哪天?
2021-12-17