I'm currently wanting to detect if I'm browsing through facebook in app browser or other web Browser. but how can I know if I'm in Facebook in-app browser. I want to see the console log. I would also like to know if I'm viewing it in the browser or webview browser.
I have a code like this
function isFacebookApp() {
var ua = navigator.userAgent || navigator.vendor || window.opera
return ua.indexOf("FBAN") > -1 || ua.indexOf("FBAV") > -1
}
{isFacebookApp == true ? (
<div style={{ paddingLeft: "1rem" }}>
This is from Facebook Browser
</div>
) : (
<div style={{ marginLeft: "1rem" }}>
{result.browser.name}
</div>
)}
But when I'm opening my app in Facebook in-app browser. it Still show me that I'm using Chrome v96. What seems to be the problem?