Possible Duplicate:
iPhone Safari: check if URL scheme is supported in javascript?
How to check if a custom protocol supported
Facebook registers the URI scheme fb:// when someone installs the Facebook app on their iPhone or iPad. Any links with fb:// will only work if the Facebook app is installed, otherwise Mobile Safari reports it doesn't know how to open the page.
Is it possible to use JavaScript/jQuery to see if Mobile Safari cannot open the page and then replace the link with a web link instead of the app link? Basically I want to use JavaScript to see if the Facebook app is installed on their phone. I'd like the solution to work on Android as well.