I referred the above link and it worked fine on Google Nexus 4, firefox as well as chrome browser. If the app was not installed anchor tag redirects it to the web browser otherwise it opens the application.
But when I tested it on different phones like HTC and Note II, as well as iPad, there were some issues like :-
1.) It was working fine but not always on Note II.(firefox and chrome) 2.) On HTC, it never opened the app. Always the facebook URL was opening up in browser.(firefox and chrome) 3.) On iPad if application is installed this code works fine which opens up the desired facebook page inside the application but if facebook app is not installed safari throws an error(Safari cannot open the page because the address is invalid).
Please let me know if there is any other way to do it or if it is related to device or browsers. Really appreciate that.