Open facebook page Ionic

Asked

Viewed 455 times

0

Hello! Use this code to open the Facebook application directly on the page on the device.

<a href="#" class="link-fb" 
    onclick="window.open('fb://page/0000000000000', '_system'); return false;">
</a>

In the Android works perfectly, opening in the page sent in the parameter. However iOS it just opens the facebook app on the home page.

Does anyone know what’s going on? Any suggestions? Thank you.

1 answer

0

I did so on my application and it worked on IOS E on Android

    <ion-list>
    <a href="https://www.facebook.com/GuiaCorretorPlus/"><ion-item>
      <ion-thumbnail item-start>
        <img src="assets/img/facebook_logo.png">
      </ion-thumbnail>
      <h2>Facebook</h2>
      <p>GuiaCorretor</p>
      <button ion-button clear item-end>View</button>
    </ion-item></a>
  </ion-list>
  • Thanks for answering, I tested this way, but it opens the browser. I would like you to open the Facebook application on the device

  • But then you’d have to use an API for this maybe.

  • With the code I posted, is working on Android, already on Ios it opens the application but not on the correct page

  • Take a look at the Cordova documentation, this might help you: https://cordova.apache.org/docs/en/2.6.0/cordova/inappbrowser/window.open.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.