From a1962b3ac6cb1b5bdc4ad8f7f8e84f75c12b98cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Dzier=C5=BCek?= Date: Mon, 31 Aug 2026 21:27:04 +0200 Subject: [PATCH] fix(instagram): request `views` instead of retired `plays` for Reels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Meta removed `plays` from Instagram media insights in Graph API v25. Asking for it makes the whole per-post metrics request fail, so Reels report no metrics at all — the request errors out rather than degrading to a partial result. `views` is the replacement metric and is available on the same edge, so this is a drop-in rename with no other changes needed. Verified against live Graph API v25: probing the media insights edge with `plays` returns an error naming the allowed metric set, which includes `views` and no longer includes `plays`. --- app/Services/Social/InstagramAnalytics.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Social/InstagramAnalytics.php b/app/Services/Social/InstagramAnalytics.php index 42356e1e3..5cd420e70 100644 --- a/app/Services/Social/InstagramAnalytics.php +++ b/app/Services/Social/InstagramAnalytics.php @@ -53,7 +53,7 @@ public function fetchPostMetrics(PostPlatform $postPlatform): array // Per-post metric set differs by content type. Reels/Stories expose // different fields than feed posts. Pick the right set per type. $metrics = match ($postPlatform->content_type) { - ContentType::InstagramReel => 'reach,likes,comments,shares,saved,plays', + ContentType::InstagramReel => 'reach,likes,comments,shares,saved,views', ContentType::InstagramStory => 'reach,impressions,replies', default => 'reach,likes,comments,shares,saved,total_interactions', };