Conversation
publishStory() ignored the upload_url returned by the video_stories
start phase and instead POSTed the media's hosted URL as a body field
called video_file_chunk to /{video_id} on the regular Graph host. That
is not a valid transfer step for this API: Facebook's Video Stories
API always returns {video_id, upload_url}, and the transfer phase has
to reach the rupload host at upload_url, not graph.facebook.com.
Every Facebook Story publish failed with Graph API error 6000
("Problem with file. Try with another file."), regardless of the
actual video (reproduced with and without an audio track). Fixed by
mirroring the already-working publishReel() transfer step: download
the hosted media and stream raw bytes to upload_url with the
Offset/file_size headers rupload requires, since the documented
file_url-header shortcut is the same shortcut publishReel()'s own
comment already flags as unreliable.
Verified against Meta's documented start/transfer/finish flow (Ayrshare's
Facebook Stories API writeup, which matches the official docs). Could not
run the local test suite (no working Postgres test database for this repo
on this machine, port 5432 is held by an unrelated project's container);
`php -l` passes on both changed files, and the updated test mirrors the
already-passing reel test's assertions against the new transfer contract.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Cryptoom
added a commit
to Cryptoom/trypost
that referenced
this pull request
Sep 17, 2026
Olli explizit: "nein wir wollen nicht helfen!" Kein Issue-Kommentar, kein PR-Angebot an trypostit#228. Der separate publishStory()- Fix (trypostit#360) bleibt unberuehrt, das war ein echter Bug-Fix, kein Feature- Beitrag. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
|
Thank you @Cryptoom i will review it soon. |
added 2 commits
September 18, 2026 08:50
The transfer already matches publishReel(); the long why belongs in the PR, not the publisher.
Extract the start/rupload/finish sequence into publishResumableVideo, pin the upload_url host to config, require success:true before finish, guard temp file/filesize/fopen failures, and require a video for both formats. Tests now cover Reels and Stories through a shared dataset.
Contributor
|
Thanks for this, @Cryptoom — your diagnosis was right: the transfer was posting We went with the hosted-file variant of the same official flow in #361: Keeping this open until #361 is verified and merged, then I'll close it. |
Contributor
|
Closing in favor of #361, which applies the fix from main with the hosted-file (file_url) flow. Thanks again for tracking down the root cause. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
publishStory()ignored theupload_urlreturned by the Video Stories API's start phase and instead POSTed the media's hosted URL as a body field calledvideo_file_chunkto/{video_id}on the regular Graph host. That is not a valid transfer step for this API: Facebook's Video Stories API always returns{video_id, upload_url}, and the transfer phase has to reach the rupload host atupload_url, notgraph.facebook.com.Every Facebook Story publish failed with Graph API error 6000 ("Problem with file. Try with another file."), regardless of the actual video (reproduced with and without an audio track).
Fix
Mirrors the already-working
publishReel()transfer step: download the hosted media and stream raw bytes toupload_urlwith theOffset/file_sizeheaders rupload requires. The documentedfile_url-header shortcut is the same shortcutpublishReel()'s own comment already flags as unreliable.Verified against Meta's documented start/transfer/finish flow (cross-checked against a third-party Facebook Stories API writeup that matches the official docs).
Test plan
php -lon both changed filesFacebookPublisherTest.phpmirrors the already-passing reel test's assertions against the new transfer contract