HTML link to launch an app if installed or go to a

2019-06-22 08:47发布

I have a mobile site written using jQuery Mobile and I have social icons. What I want is that if the user clicks on the Facebook icon to open the facebook app only if the user has the facebook app installed on their phone. If the user does not have the app on the phone I need it to go to Facebook's mobile site instead.

I am using this link to open the app:

<a href="fb://profile/212971392077465" class="facebook">My Fanpage</a>

This works, but now I need help with code to open the mobile site if the user doesn't have these apps installed.

Ideally, this same technique should work with Twitter (I use twitter://status?id=12345 to get to the app).

0条回答
登录 后发表回答