public function getShares($url) { $data = json_decode(file_get_contents(sprintf(self::API_URL, urlencode($url)))); return intval($data->count); }