-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
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
开放平台 APP 微信登录 #604
Comments
暂时只支持开放平台的第三方平台,app微信登录还没支持 :) |
那就是说我现在应该由后台去处理这个code还是由APP去处理? |
应该和网页授权的原理差不多吧?服务端处理 |
话说4.0什么时候会出呢^_^ |
因为APP微信授权登录后,获取用户信息的流程基本和微信网页授权登录后差不多,只是APPID和APPSECRET不同,有没有方法在当前版本能复用微信网页授权后的那套获取用户信息的逻辑呢? |
貌似和普通的授权一样的。那么直接用这个包就好了:overtrue/socialite
代码自行测试 :) |
👍 |
么么哒 |
@overtrue 最后成功了吗?code怎么传的 |
use Overtrue\Socialite\SocialiteManager;
$appCode = 'app中获取到的code';
$config = [
'wechat' => [
'client_id' => 'your-app-id',
'client_secret' => 'your-app-secret',
'redirect' => null,
],
];
$socialite = new SocialiteManager($config);
$wechat = $socialite->driver('wechat');
$accessToken = $wechat->getAccessToken($appCode);
$user = $wechat->user($accessToken); 亲测可以 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我用的环境
PHP 版本:5.6
overtrue/wechat 版本:3.0
问题及现象
在做APP的微信授权登录(不是网页授权登录,是跳转微信APP去授权),在文档里看到“开放平台”的模块。但并不知道怎么使用?
现在APP通过授权登录获得了code,我这边后台如何用这个模块配合利用这个code去获取微信用户的信息?
The text was updated successfully, but these errors were encountered: