Skip to content

fix: preserve Facebook link destinations in Glow - #43

Closed
Thetromboneman1 wants to merge 6 commits into
dayanch96:mainfrom
Thetromboneman1:fix/preserve-facebook-link-destinations
Closed

Thetromboneman1 wants to merge 6 commits into
dayanch96:mainfrom
Thetromboneman1:fix/preserve-facebook-link-destinations

Conversation

@Thetromboneman1

@Thetromboneman1 Thetromboneman1 commented Aug 9, 2026 •

Copy link
Copy Markdown

Why

Facebook links opened from Messages or Safari can launch a sideloaded Glow build but lose the selected destination and land on the main timeline. Sideloaded builds cannot claim Meta's Universal Links, and the former fb://faceweb/f?href=... fallback does not reliably preserve destinations on current Facebook builds.

Facebook's /share/p/, /share/r/, and /share/v/ pages are wrappers. They expose the real post through canonical and Open Graph metadata, but handing the wrapper itself to Facebook can still open Home.

@dayanch96, please review the workflow integration and the two companion extensions, especially the fb-www-link://www_link/?url=... handoff contract and the validated wrapper resolution.

What changed

  • Add a source-built Safari Web Extension that validates Facebook-family URLs and hands the selected URL to Facebook's registered WWW-link route.
  • Resolve /share/p/, /share/r/, and /share/v/ wrappers to a safe Facebook canonical or Open Graph destination.
  • Reject Home destinations, recursive share wrappers, malformed inputs, and lookalike hosts.
  • Keep the full current URL for normal Facebook links and fall back to the original wrapper when no useful destination exists.
  • Add Facebook Glow - Open Link to the Share Sheet as an explicit fallback.
  • Embed both unsigned extensions into the generated IPA using the workflow-selected bundle identifier and app version. Downstream sideload signing remains unchanged.
  • Preserve unrelated existing app extensions instead of replacing the entire PlugIns directory.
  • Add exact Reel and share-video regression coverage, an arm64 extension build check, and user-facing setup documentation.
  • Quote GitHub environment paths and pass workflow inputs through environment variables to keep the edited workflow shell-safe.

Verification

Both exact URLs below were physically accepted on an iPhone 15 Pro running iOS 26.6. Each opened its selected destination in Glow instead of the main timeline.

https://www.facebook.com/reel/1071097325498008/?referral_source=external_link&surface_type=tab&in_reels_tab_context=TRUE
https://www.facebook.com/share/v/19RsNqHveR/?mibextid=wwXIfr

The share-video wrapper resolved to:

https://www.facebook.com/MEMES.of.the.NFL/posts/1467604858743867/

The Objective-C routing tests and JavaScript redirect regressions pass, both extensions build as unsigned arm64 iOS app extensions, and the embedding script produced a structurally valid IPA containing bundle-ID-matched Share and Safari extensions. The final signed 1.0.1 build passed archive integrity, deep strict signature verification, in-place installation, native route launch, and physical destination acceptance. No decrypted IPA, signed artifact, provisioning profile, certificate, or secret is included in this PR.

@Thetromboneman1
Thetromboneman1 marked this pull request as ready for review August 9, 2026 20:33
@Thetromboneman1

Copy link
Copy Markdown
Author

@dayanch96, please review this destination-preserving Safari/Share routing integration and approve the held Link Router workflow run when convenient. I attempted a formal GitHub reviewer request, but contributors without write access cannot invoke RequestReviewsByLogin on this upstream repository.

@Thetromboneman1

Copy link
Copy Markdown
Author

Fork CI is green for commit 79ca77b: Link Router run 31334638174. It ran the Objective-C and JavaScript route tests, generated the Xcode project, and built both unsigned arm64 iOS extensions. The equivalent upstream run remains held for maintainer approval because this PR introduces a workflow from a fork.

@Thetromboneman1

Copy link
Copy Markdown
Author

@dayanch96, the latest commit adds the exact /share/v/19RsNqHveR/ regression. Facebook exposes the NFL Memes post as its canonical destination; Link Router 1.0.1 now validates and routes that destination before launching Glow. The rebuilt app opened the expected video post on the physical iPhone 15 Pro, and the local Objective-C, JavaScript, arm64 extension-build, archive, signature, install, and device acceptance checks pass.

@Thetromboneman1

Copy link
Copy Markdown
Author

Fork CI is green at exact commit 42aeab6: Link Router run 31661414695. The upstream PR still has no formal review request because GitHub does not allow a fork contributor without write access to request the upstream maintainer as a reviewer.

@Thetromboneman1

Copy link
Copy Markdown
Author

@dayanch96, follow-up commit fixes the live Safari race found on the physical device. Facebook currently returns Refresh: 0 for the tested /share/v/ wrapper, so a document_end script can lose before canonical routing. Link Router 1.0.2 runs at document_start, stops the wrapper navigation, fetches and validates its metadata, then opens the resolved post. The exact regression tests and both extension route test suites pass.

@Thetromboneman1

Copy link
Copy Markdown
Author

Fork CI is green at exact commit cf85c59: Link Router run 31662035624. Route tests and both unsigned arm64 extension builds passed.

@Thetromboneman1

Copy link
Copy Markdown
Author

@dayanch96, the final follow-up handles in-place upgrades where Safari retained Link Router 1.0.1’s attempted marker. The marker is now a short-lived timestamp, and legacy values are treated as stale. Physical Safari acceptance passes: the exact share URL opened the NFL Memes Kyler Murray video in Glow instead of Home.

@Thetromboneman1

Copy link
Copy Markdown
Author

Final exact-head verification: fork CI passed at 0e3e81f144 in Link Router run 31662351794. The PR is mergeable; upstream merge and workflow approval remain with @dayanch96.

@Thetromboneman1
Thetromboneman1 deleted the fix/preserve-facebook-link-destinations branch September 25, 2026 02:29
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.

1 participant