PHP code example of f-oris / easy-smartprogram
1. Go to this page and download the library: Download f-oris/easy-smartprogram 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/ */
f-oris / easy-smartprogram example snippets
// 配置好config,获取code...
$app = new Application($config);
$session = $app->auth->session($code);
$uionidData = $app->auth->getUnionid($session['openid']);
// {"unionid": "St6PVMkgMDeh92Uq2EWfx6H"}