myijun / uni-socialite
1.0.0
2020-12-24 09:24 UTC
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2024-09-24 18:48:38 UTC
README
微信小程序登录获取到code
<?php $config = new \Myj\UniSocialite\AppConfig(); $config->setAPPID('appid')->setAPPSecret('appsecret')->setSessionKey('session_key'); \Myj\UniSocialite\UniSocialite::driver(\Myj\UniSocialite\Drivers\Wechat\Wechat::class, $config)->witch(['code' => ''])->login();
微信小程序登录后进行用户信息绑定注册
<?php $args = []; \Myj\UniSocialite\UniSocialite::driver(\Myj\UniSocialite\Drivers\Wechat\Wechat::class, $config)->witch (\Myj\UniSocialite\Drivers\Wechat\Wechat::registerWitch(...$args))->register();