Skip to content

Update Facebook Graph API to v26.0 - #1142

Merged
pirate-bot merged 3 commits into
developmentfrom
bugfix/1140
Oct 4, 2026
Merged

pirate-bot merged 3 commits into
developmentfrom
bugfix/1140

Conversation

@girishpanchal30

Copy link
Copy Markdown
Contributor

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

@pirate-bot

pirate-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Plugin build for e6e2827 is ready 🛎️!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Link-share scraping still uses an unversioned Graph API endpoint.

Review effort: Balanced
Findings: 1 Medium severity

Open (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.

@pirate-bot pirate-bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_RopFacebookGraphVersion passes 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_version for 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

Comment thread tests/test-facebook-graph-version.php Outdated

@pirate-bot pirate-bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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_RopFacebookGraphVersion passed on PHP 8.3 (4 tests).
  • That run also showed that all 4 tests fail with the pr-base service 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

@pirate-bot
pirate-bot merged commit 2e9ee7c into development Oct 4, 2026
7 checks passed
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.

Facebook sharing fails after Graph API v20.0 retirement

4 participants