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
LNMP
PHP 版本:7.0.4 overtrue/wechat 版本:3.1.0
这里我拿到了code和state, 之后是怎么取到用户信息的? 按照文档, 在callback.php直接用$auth->user()会报The key "access_token" could not be empty.
code
state
callback.php
$auth->user()
The key "access_token" could not be empty
我得callback模仿这里写的:
我是不是少了一步?
The text was updated successfully, but these errors were encountered:
额, 我懂了. $app->auth->user()的app的配置不能带oauth的配置?
原来的app, 这个取不到用户信息:
$this->app = new Application([ 'app_id' => self::APPID, 'secret' => self::APPSECRET, 'debug' => true, 'oauth' => [ 'scopes' => ['snsapi_userinfo'], 'callback' => '/auth/weixin-openid', ], ]); $this->app->oauth->user();
后来的app, 可以取到:
(new Application([ 'app_id' => self::APPID, 'secret' => self::APPSECRET, 'debug' => true, ]))->oauth->user();
Sorry, something went wrong.
No branches or pull requests
我用的环境
LNMP
PHP 版本:7.0.4
overtrue/wechat 版本:3.1.0
问题及现象
这里我拿到了
code
和state
, 之后是怎么取到用户信息的? 按照文档, 在callback.php
直接用$auth->user()
会报The key "access_token" could not be empty
.我得callback模仿这里写的:
我是不是少了一步?
The text was updated successfully, but these errors were encountered: