javascript - How to detect Facebook in-app browser? -
have had experience in facebook in-app browser detection? what's core difference in user agent?
i don't want know if mobile/ios/chrome. need know whether user agent specific facebook in-app browser
you can check fban / fbav in user agent.
check link: facebook user agent
sample code @sascha suggested
function isfacebookapp() { var ua = navigator.useragent || navigator.vendor || window.opera; return (ua.indexof("fban") > -1) || (ua.indexof("fbav") > -1); }
Comments
Post a Comment