Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

授权页面

wangyi edited this page Dec 22, 2016 · 1 revision

授权页面

用于创建授权页面链接提供给微信公众号扫描

授权页面代码示例

$config = [
    'debug'                => true,
    'component_app_id'     => 'wxd954……',                                   //第三方平台app id
    'component_app_secret' => 'a7a48d271…………',                              //第三方平台app secret
    'token'                => 'easy-open-wechat-token',                     //公众号消息校验Token
    'aes_key'              => '90ID6sSTuY……Uh6BWDct',                       //公众号消息加解密Key
    'redirect_uri' => 'http://yourhostname/authcallback.php',               //公众号授权回调页面
    'log' => [
        'level' => 'debug',
        'file'  => '/tmp/easyopenwechat.log',
    ],
];

$app = new \Chunhei2008\EasyOpenWechat\Foundation\Application($config);

//通过login对象获取授权页面链接
$page = $app->login->getLoginPage();

Clone this wiki locally