Skip to content

feat(socials): account-level Instagram insights ability and CLI (#3952) - #3953

Merged
chubes4 merged 2 commits into
mainfrom
feat/instagram-account-insights
Nov 15, 2026
Merged

chubes4 merged 2 commits into
mainfrom
feat/instagram-account-insights

Conversation

@chubes4

@chubes4 chubes4 commented Nov 14, 2026

Copy link
Copy Markdown
Member

Closes #3952.

What

  • New ability datamachine/instagram-account-insights (InstagramAccountInsightsAbility), registered with the Instagram provider in PlatformBootstrap. It uses the same permission and REST visibility as instagram-insights.
    • Returns followers_count, follows_count, media_count and totals for reach, views, accounts_engaged, total_interactions and profile_links_taps over days (1–30, default 28, using the Graph API's metric_type=total_value).
    • A metric Instagram omits is null, never 0.
    • A missing scope gives the same re-auth guidance as media insights.
  • New CLI: wp datamachine-socials instagram account_insights [--days=<n>] [--format=json].
  • No new scope is needed; instagram_manage_insights already covers it.

follows_and_unfollows is left out on purpose: it returns null without a follow_type breakdown. Follower trend comes from the followers_count snapshot per read.

Evidence

Same calls verified live on @extrachill (28d): followers 9,295, reach 9,698, views 41,392, engaged 826, interactions 1,569, link taps 0.

Tests

InstagramAccountInsightsTest covers the totals and the exact Graph query, null for an omitted metric, rejecting windows over 30 days, the missing scope, and the unauthenticated case. homeboy review test data-machine-socials: 413 passed, 0 failed.


Written by Extra Chill Bot (AI agent).

@chubes4
chubes4 merged commit 5f767d7 into main Nov 15, 2026
2 checks passed
@chubes4
chubes4 deleted the feat/instagram-account-insights branch November 15, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Socials: account-level Instagram insights (followers, reach, views, engagement)

1 participant