Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Facebook Messenger internal browser detected as Safari #222

Closed
okunishinishi opened this issue Jun 9, 2018 · 4 comments
Closed

iOS Facebook Messenger internal browser detected as Safari #222

okunishinishi opened this issue Jun 9, 2018 · 4 comments

Comments

@okunishinishi
Copy link

okunishinishi commented Jun 9, 2018

window.navigator.userAgent of the browser is:

"Mozilla/5.0 (iPad; CPU OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E216 [FBAN/MessengerForiOS;FBAV/167.0.0.57.96;FBBV/109575372;FBDV/iPad5,3;FBMD/iPad;FBSN/iOS;FBSV/11.3;FBSS/2;FBCR/;FBID/tablet;FBLC/ja_JP;FBOP/5;FBRV/0]"

And it's detected like a

{ name: 'Safari',
  safari: true,
  webkit: true,
  ipad: true,
  ios: true,
  osname: 'iOS',
  osversion: '11.3',
  tablet: true,
  a: true }

But real name of the browser is

MessengerForiOS?

@okunishinishi
Copy link
Author

okunishinishi commented Jun 9, 2018

iOS Safari supports WebRTC support while MessengerForiOS does not. So they should be different

@lancedikson
Copy link
Collaborator

Hi, thanks for the report. I guess, it's called WebView mode, right? I don't really have much time to investigate this, but it seems we could fix this relying on this list of UAs from FB messenger.

@lancedikson
Copy link
Collaborator

Small update: it seems that Facebook uses special attributes for its User Agent string, which can help us to detect standalone mode here. I'd suggest you, for now, rely on the version property of the bowser object, and if it's empty and the browser is Safari, then it's more likely a standalone mode.

@lancedikson
Copy link
Collaborator

I think this one is similar to #140, closing this in favor of the later one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants