in Model/Feed/CategoryCollection.php [441:470]
public function deleteCategoryFromFB(Category $category)
{
$access_token = $this->fbeHelper->getAccessToken();
if ($access_token == null) {
$this->fbeHelper->log("can't find access token, won't do category delete");
return;
}
$this->fbeHelper->log("category name:". $category->getName());
$set_id = $this->getFBProductSetID($category);
if ($set_id == null) {
$this->fbeHelper->log("cant find product set id, won't make category delete api");
return;
}
$set_path = "/" . $set_id . "?access_token=". $access_token;
$url = $this->fbeHelper::FB_GRAPH_BASE_URL .
$this->fbeHelper->getAPIVersion() .
$set_path;
// $this->fbeHelper->log("product set deletion API - " . $url);
$response_body = null;
try {
$response_body = $this->httpClient->makeDeleteHttpCall($url);
if (strpos($response_body, 'true') !== false) {
$configKey = $this->getCategoryKey($category);
} else {
$this->fbeHelper->log("product set deletion failed!!! ");
}
} catch (\Exception $e) {
$this->fbeHelper->logException($e);
}
}