Home >Backend Development >PHP Tutorial >Laravel 5.2 uses WeChat in Socialite Providers to log in. You can jump to WeChat to display the QR code, but the user information cannot be obtained.
The package used is this https://github.com/SocialiteProviders/Weixin-Web
The code is as follows:
<code class="php">public function weixin() { return \Socialite::with('weixinweb')->redirect(); } public function weixin_callback() { $oauthUser = \Socialite::driver('weixinweb')->user(); var_dump($oauthUser); }</code>
Has anyone ever used WeChat login in Socialite Providers?
Prompt after callback:
The package used is this https://github.com/SocialiteProviders/Weixin-Web
The code is as follows:
<code class="php">public function weixin() { return \Socialite::with('weixinweb')->redirect(); } public function weixin_callback() { $oauthUser = \Socialite::driver('weixinweb')->user(); var_dump($oauthUser); }</code>
Has anyone ever used WeChat login in Socialite Providers?
Prompt after callback:
Just use the following version. It should be a version conflict or compatibility issue.
<code> "socialiteproviders/manager": "2.1.2", "socialiteproviders/weibo": "2.0.1", "socialiteproviders/qq": "2.0.3", "socialiteproviders/weixin-web": "2.0.1", "socialiteproviders/weixin": "2.1.1",</code>