I have to send a url to fb user. Which will open my app with some message after clicking the link in fb. If my app is installed then the link will open my app in smartphone with message and if not installed then it will open up in web browser using web player.
Unfortunately I don’t think you will be able to do that. You can’t supply FB with a link that does more than one thing.
You can detect in your own App if a link exists or not and then redirect to a different page if your app is not installed. But you can’t force a third party application to do the same thing.