bug: Facebook plugin ignores media attachments for feed posts #233

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

Description

FacebookService::publishFeed() only posts message and optional link parameters to the /{page_id}/feed endpoint. It never uses the $media array despite declaring supportsMedia(): true and getSupportedMediaTypes(): ['image', 'video', 'gif'].

The media array is correctly passed from CrossPostDispatcher and used for Reels/Stories content types, but feed posts ignore it entirely.

Expected behavior

When $media is non-empty for feed posts:

  1. Upload photos via POST /{page_id}/photos with published=false
  2. Reference the returned photo IDs in the feed post as attached_media
  3. Or for single image posts, post directly to /{page_id}/photos with message

Current behavior

Feed posts are always text-only (with optional link). The article's intro image from Joomla is never attached.

Affected file

source/packages/plg_mokosuitecross_facebook/src/Extension/FacebookService.php
Method: publishFeed() (line 64)

## Description `FacebookService::publishFeed()` only posts `message` and optional `link` parameters to the `/{page_id}/feed` endpoint. It never uses the `$media` array despite declaring `supportsMedia(): true` and `getSupportedMediaTypes(): ['image', 'video', 'gif']`. The media array is correctly passed from `CrossPostDispatcher` and used for Reels/Stories content types, but feed posts ignore it entirely. ## Expected behavior When `$media` is non-empty for feed posts: 1. Upload photos via `POST /{page_id}/photos` with `published=false` 2. Reference the returned photo IDs in the feed post as `attached_media` 3. Or for single image posts, post directly to `/{page_id}/photos` with `message` ## Current behavior Feed posts are always text-only (with optional link). The article's intro image from Joomla is never attached. ## Affected file `source/packages/plg_mokosuitecross_facebook/src/Extension/FacebookService.php` Method: `publishFeed()` (line 64)
Author
Owner

Branch created: feature/233-bug-facebook-plugin-ignores-media-attach

git fetch origin
git checkout feature/233-bug-facebook-plugin-ignores-media-attach
Branch created: [`feature/233-bug-facebook-plugin-ignores-media-attach`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteCross/src/branch/feature/233-bug-facebook-plugin-ignores-media-attach) ```bash git fetch origin git checkout feature/233-bug-facebook-plugin-ignores-media-attach ```
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#233