4

I've searched and found that to open Facebook it is:

window.location = "fb://";         /* It works fine   */

Instead of:

window.location = "facebook://";   /* It doesn't work */ 

The problem is:

I need to open an app like "facebook", but I don't know how to find the appName URL Scheme like fb:// is for "Facebook"...

I've tried a lot of name combinations, but without success.

I would be glad if you could give me some hint to achieve this.

Community
  • 1
  • 1

2 Answers2

3

As Palpatim said, you can look at an online registry, such as this one.

Otherwise, there is no way to get this scheme programatically in Javascript. You can find it by hand if you open an .ipa file, in Payload/*appName.app/Info.plist. You'll see a list of urls like this:

URLs

This picture for example will respond to product://.

Be aware that opening an .ipa file might be considered reverse engineering, so only do this on your own apps.

Moustach
  • 2,904
  • 1
  • 13
  • 23
  • 1
    By the way, I forgot to say that *some apps do not support URL Schemes*. That means there is no way to open them from anywhere else, sorry... – Moustach Jun 22 '15 at 12:37
-2

Because the Facebook is known as fb so they have coded it like that so maybe the main function can change it

aman ali
  • 26
  • 2