On mobile, open facebook's sharer.php link to load the Facebook app instead of a new tab in the browser

260 Views Asked by At

These two facebook and twitter share links work properly.

<a href="https://www.facebook.com/sharer/sharer.php?u={{ myURL | urlencode }}" target="_blank"><i class="fa fa-facebook-square fa-2x"></i></a>

<a href="https://twitter.com/share?url={{ myURL | urlencode }}&amp;text={{ article }}" target="_blank"><i class="fa fa-twitter-square fa-2x"></i></a>

On mobile, twitter link opens the Twitter app, but for the facebook sharer, the browser (Safari) opens a new tab with the facebook login link. I want the same functionality as Twitter - clicking on the facebook sharer.php link should open the Facebook app. Can I control this via code on my HTML page ?

0

There are 0 best solutions below