$this->appId, 'secret' => $this->appSecret, 'grant_type' => 'authorization_code', 'js_code' => $code ]), true); if (isset($result['errcode'])) { $this->error = $result['errmsg']; return false; } return $result; } }