|
@@ -40,12 +40,13 @@ class Sample
|
|
|
|
|
|
$client = self::createClient();
|
|
|
$getAccessTokenRequest = new GetAccessTokenRequest([
|
|
|
-// "appKey" => "dingekepwoyycxfbtyvg",
|
|
|
-// "appSecret" => "EjM9WohvKHo3eNqZGGbQHhbjM80QzapdC_f_reYiOCyEFOtaG1qoG2KzEfpSoLWe",
|
|
|
- // 测试用
|
|
|
- "appKey" => "'dingilnkljzq3a4chjrw",
|
|
|
- "appSecret" => "Dt-nHAw4G-dniS7P9VmbnQRIKHQfGIQNIVHVNVHOZMtLPcsIv4KJYk_AjBCRsaH4"
|
|
|
+ "appKey" => "dingekepwoyycxfbtyvg",
|
|
|
+ "appSecret" => "EjM9WohvKHo3eNqZGGbQHhbjM80QzapdC_f_reYiOCyEFOtaG1qoG2KzEfpSoLWe",
|
|
|
]);
|
|
|
+// $getAccessTokenRequest = new GetAccessTokenRequest([
|
|
|
+// "appKey" => "'dingilnkljzq3a4chjrw",
|
|
|
+// "appSecret" => "Dt-nHAw4G-dniS7P9VmbnQRIKHQfGIQNIVHVNVHOZMtLPcsIv4KJYk_AjBCRsaH4"
|
|
|
+// ]);
|
|
|
try {
|
|
|
$res = $client->getAccessToken($getAccessTokenRequest);
|
|
|
} catch (Exception $err) {
|
|
@@ -55,6 +56,7 @@ class Sample
|
|
|
if (!Utils::empty_($err->code) && !Utils::empty_($err->message)) {
|
|
|
// err 中含有 code 和 message 属性,可帮助开发定位问题
|
|
|
}
|
|
|
+ p($err->getMessage(), $err->getCode());exit;
|
|
|
}
|
|
|
|
|
|
if ($res->body) {
|