From cf6743fbbd7869f6629c0189beff20d2f2cdcf68 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sat, 14 Mar 2026 00:01:34 -0500 Subject: [PATCH] fix: corregir URL de upload binario a graph.facebook.com/{version}/{session_id} --- api/upload_whatsapp_profile_photo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/upload_whatsapp_profile_photo.php b/api/upload_whatsapp_profile_photo.php index 9b0876f..170f0de 100644 --- a/api/upload_whatsapp_profile_photo.php +++ b/api/upload_whatsapp_profile_photo.php @@ -99,11 +99,11 @@ try { $uploadSessionId = $sessionData['id']; // ── Paso 2: Subir el archivo binario ────────────────────────────────────── - // POST https://rupload.facebook.com/whatsapp-business-profile/{session_id} + // POST https://graph.facebook.com/{version}/{upload_session_id} $fileContent = file_get_contents($file['tmp_name']); if ($fileContent === false) throw new Exception("No se pudo leer el archivo temporal"); - $uploadUrl = "https://rupload.facebook.com/whatsapp-business-profile/{$uploadSessionId}"; + $uploadUrl = "https://graph.facebook.com/{$apiVersion}/{$uploadSessionId}"; $ch2 = curl_init(); curl_setopt_array($ch2, [