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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -