Open in FB/Twitter/Instagram App vs. Open in Browser
I have an app that is to open the user's Facebook, Twitter, and Instagram feeds in the appropriate app. However, if the person doesn't have that app (i.e. no Facebook app), it should open in an internet browser.
I tried this code...
precode
try
{
window.open('instagram://user?username='+localStorage.getItem("churchIG"), "system");
}
catch(err)
{
window.open("http://www.instagram.com/"+localStorage.getItem('churchIG'), "system");
}
/code/pre
But it's not working. What should I do?