chore: Facebook/Instagram API version pinned to v19.0 -- should be a constant #239

Open
opened 2026-06-29 14:21:50 +00:00 by jmiller · 1 comment
Owner

Description

All Facebook and Instagram API calls are hardcoded to Graph API v19.0 across multiple plugins:

  • FacebookService.php -- 6 occurrences of v19.0
  • InstagramService.php -- 3 occurrences of v19.0

Meta deprecates API versions approximately every 2 years. When v19.0 reaches end-of-life, every URL must be updated across multiple files.

Fix

Define the API version as a class constant or component parameter:

private const GRAPH_API_VERSION = 'v19.0';

Or make it configurable in the plugin params so users can update without code changes:

$apiVersion = $this->params->get('graph_api_version', 'v21.0');

Impact

  • Severity: Low -- works fine now, but maintenance burden when Meta deprecates v19.0
  • Affected files: FacebookService.php, InstagramService.php
## Description All Facebook and Instagram API calls are hardcoded to Graph API `v19.0` across multiple plugins: - `FacebookService.php` -- 6 occurrences of `v19.0` - `InstagramService.php` -- 3 occurrences of `v19.0` Meta deprecates API versions approximately every 2 years. When v19.0 reaches end-of-life, every URL must be updated across multiple files. ## Fix Define the API version as a class constant or component parameter: ```php private const GRAPH_API_VERSION = 'v19.0'; ``` Or make it configurable in the plugin params so users can update without code changes: ```php $apiVersion = $this->params->get('graph_api_version', 'v21.0'); ``` ## Impact - **Severity**: Low -- works fine now, but maintenance burden when Meta deprecates v19.0 - **Affected files**: `FacebookService.php`, `InstagramService.php`
Author
Owner

Branch created: feature/239-chore-facebook-instagram-api-version-pin

git fetch origin
git checkout feature/239-chore-facebook-instagram-api-version-pin
Branch created: [`feature/239-chore-facebook-instagram-api-version-pin`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteCross/src/branch/feature/239-chore-facebook-instagram-api-version-pin) ```bash git fetch origin git checkout feature/239-chore-facebook-instagram-api-version-pin ```
Sign in to join this conversation.
No labels
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteCross#239