作者 王智

baoxiu22

... ... @@ -205,18 +205,8 @@ class Common extends Api
//模板消息测试
public function message()
{
$options = [
'app_id' => 'wx3b0bb7a5d1e0722d', // AppID
'secret' => '104ac7dbcc57b778a7319d35d38ed9cd',
];
$app = new Application($options);
$userService = $app->user;
$dist = $userService->lists($nextOpenId = null); // $nextOpenId 可选
dump($dist);
die;
$token = $this->AccessToken();
dump($token);
$list = $this->ListOpenid();
dump($list);
die;
$options = [
'app_id' => 'wx2adc803c6e8fd596', // AppID
... ...
... ... @@ -393,4 +393,17 @@ class Api
$token = $accessToken->getToken(); // token 字符串
return $token;
}
//获取公众号所有粉丝openid
public function ListOpenid()
{
$options = [
'app_id' => 'wx3b0bb7a5d1e0722d', // AppID
'secret' => '104ac7dbcc57b778a7319d35d38ed9cd',
];
$app = new Application($options);
$userService = $app->user;
$dist = $userService->lists($nextOpenId = null); // $nextOpenId 可选
return $dist['data'];
}
}
... ...