Esempio n. 1
0
 public function GetAppInfo()
 {
     if ($this->access_token === false) {
         return false;
     }
     $h = new \Bitrix\Main\Web\HttpClient();
     $h->setTimeout($this->httpTimeout);
     $result = $h->get(self::APP_URL . '?fields=id&access_token=' . urlencode($this->access_token));
     $result = \Bitrix\Main\Web\Json::decode($result);
     return $result['response'];
 }
Esempio n. 2
0
 public function GetAppInfo()
 {
     if ($this->access_token === false) {
         return false;
     }
     $h = new \Bitrix\Main\Web\HttpClient();
     $h->setTimeout($this->httpTimeout);
     $result = $h->get(self::GRAPH_URL . '/debug_token?input_token=' . $this->access_token . '&access_token=' . $this->appID . "|" . $this->appSecret);
     $result = \Bitrix\Main\Web\Json::decode($result);
     if ($result["data"]["app_id"]) {
         $result["id"] = $result["data"]["app_id"];
     }
     return $result;
 }