Skip to content

Add Facebook Mobile in-app browser detection#609

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/add-facebook-mobile-detection
Draft

Add Facebook Mobile in-app browser detection#609
Copilot wants to merge 2 commits intomasterfrom
copilot/add-facebook-mobile-detection

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Facebook's in-app browser on iOS/Android was not being detected, causing web apps opened from Facebook links to be misidentified.

Changes

  • Browser detection (parser-browsers.js): Added descriptor matching [FBAN/ marker (covers both FBIOS and FB4A variants), extracting version from FBAV/ parameter when present
  • Aliases (constants.js): Added facebookFacebook Mobile mappings for satisfies() support
  • Test coverage (useragentstrings.yml): Added cases for iOS (iPhone/iPad) and Android, including version and no-version variants

Example

const ua = 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBAV/328.0.0.29.120]';

Bowser.parse(ua).browser.name;  // "Facebook Mobile"

Bowser.getParser(ua).satisfies({ facebook: '>300' });  // true

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • developers.whatismybrowser.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Identifying Facebook Mobile</issue_title>
<issue_description>It's an edge case, as the facebook app tends to use the browsers available on the device for external links (works fine on Android devices). But it seems this is not the case if used on IPhones. As a result it's possible for any web app to be displayed via "facebook mobile" if linked there from the app.

Would it be possible for this detection to be added to bowserjs?

window.navigator.userAgent of the browser is:
see https://developers.whatismybrowser.com/useragents/explore/software_name/facebook-app/

</issue_description>

Comments on the Issue (you are @copilot in this section)

@lancedikson Hi @anderschbe. Check out the #140 issue, please. It seems to be related to that one in general. It would be possible to come up with some solution, but I'm afraid I don't have much time to develop it. Only if somebody could help me out with arranging and systemizing all the knowledge about how different FB can mark their stuff in UA strings :)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
Copilot AI changed the title [WIP] Add detection for Facebook Mobile in bowserjs Add Facebook Mobile in-app browser detection Feb 13, 2026
Copilot AI requested a review from naorpeled February 13, 2026 21:46
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.

Identifying Facebook Mobile

2 participants