3,143
社区成员
发帖
与我相关
我的任务
分享
<?php
include_once __DIR__ . '/lib/wxlib/wxsdk/api/WxWeb.Api.php';
define("AppID", "wxc5bc41cb7c73814f");
define("AppSecret", "73bc6416bd0151536eda55248e0101e9");
class WxBaseAppImpl implements IWxBaseApp {
public function appid() {
return AppID;
}
public function appsecret() {
return AppSecret;
}
public function access_token() {
return "";
}
}
$api = new WxWebApiOAuth();
$api->app(new WxBaseAppImpl());
$json = $api->action("snsapi_base", "STATE");
//$access_token = $json["access_token"];
$openid = $json["openid"];
?>