Repository navigation
Update Facebook Graph API to v26.0 - #1142
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Link-share scraping still uses an unversioned Graph API endpoint.
Review effort: Balanced
Findings: 1
What changed in this PR
Updates Facebook publishing from Graph API v20.0 to v26.0.
Changes:
- Centralizes the Facebook Graph API version.
- Updates SDK and direct publishing endpoints.
- Adds regression tests for text, video, and SDK paths.
| File | Description |
|---|---|
class-rop-facebook-service.php |
Applies v26.0 to primary Facebook publishing paths. |
tests/test-facebook-graph-version.php |
Tests versioned publishing endpoints. |
phpunit.xml |
Registers the new test suite. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| class Rop_Facebook_Service extends Rop_Services_Abstract { | ||
|
|
||
| /** | ||
| * The Facebook Graph API version used for every request. |
There was a problem hiding this comment.
🟡 Changes requested
The Graph API move to v26.0 works and is tested. Narrow one broad return type in the new test.
Validation details
- Files reviewed: 3/3 changed files.
- PHP 8.3, WordPress 7.1.2 test library:
Test_RopFacebookGraphVersionpasses at HEAD (4 tests, 9 assertions). - With only the service file from
pr-base, all 4 tests fail on the version assertion. - The Facebook SDK 5.7.0 uses
default_graph_versionfor requests, login and pagination. - No other Graph API URL or version remains in the plugin source.
- Meta lists v26.0 as the latest version. The v26.0 breaking changes do not touch the requests that the plugin sends.
- The Copilot scrape thread is fixed at HEAD. The scrape URL now uses the constant.
Untested areas
- Live Facebook requests were not sent. No test account is available.
- Pro plugin Instagram and Facebook helper paths live in another repository.
🤖 Automated review · run code-review-agent_6abe1c6378a850.48077930.
🤖 Review agent — review posted ✅ on ec36e825 · changes requested · 1 finding · 10 min
Run code-review-agent_6abe1c6378a850.48077930 · trail
There was a problem hiding this comment.
🟢 Approved
The earlier return type finding is fixed, and the Graph API move to v26.0 is tested.
Validation details
- Files reviewed: 3/3 changed files.
- The only new commit,
e6e2827, changes one docblock. It adds the requested return shape. - Run code-review-agent_6abe1c6378a850.48077930, not rerun:
Test_RopFacebookGraphVersionpassed on PHP 8.3 (4 tests). - That run also showed that all 4 tests fail with the
pr-baseservice file. - The Copilot scrape URL thread is fixed. The scrape request now uses the version constant.
Untested areas
- Live Facebook requests were not sent. No test account is available.
- Pro plugin Facebook and Instagram paths live in another repository.
🤖 Automated review · run code-review-agent_6abe20bb199bb0.74405924.
🤖 Review agent — review posted ✅ on e6e28274 · approved · 0 findings · 2 min
Run code-review-agent_6abe20bb199bb0.74405924 · trail

Summary
Moves every Facebook Graph API request in the plugin from v20.0 to v26.
Meta retired Graph API v20.0 on September 24, 2026, as mentioned here. Sharing has not broken: Meta forwards calls to a retired version to the next oldest version still available. So today our v20.0 requests are quietly handled as v21.0, a version we never chose or tested.
Closes #1140