PHP code example of cblink-service / socialite-weixin

1. Go to this page and download the library: Download cblink-service/socialite-weixin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cblink-service / socialite-weixin example snippets


'cblink-weixin' => [    
  'sandbox' => env('WEIXIN_SANDBOX', false),
  'uuid' => env('WEIXIN_UUID'),
  'client_id' => env('WEIXIN_CLIENT_ID'),  
  'client_secret' => env('WEIXIN_CLIENT_SECRET'),  
  'redirect' => env('WEIXIN_REDIRECT_URI') 
],

protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        'Cblink\\Service\\SocialiteWeixin\\WeixinExtendSocialite@handle',
    ],
];

return Socialite::driver('cblink-weixin')->redirect();