Search code examples
javascriptiosfacebookcordovainappbrowser

Open facebook page link in browser or native app correctly IOS cordova


Previous question on this similar topic isn't working for me and most of them are unanswered.

I want to take the user to a facebook page with button click. Updated facebook is installed in iphone, latest cordova is installed, inappbrowser plugin is used. Now my code is

window.open('https://www.facebook.com/latechnologies', '_system','location=yes');

This works perfectly on android. But in IOS link is catched by nation facebook app and take me to the facebook wall of the use not the page feed. That means it just open the native app,but don't take to any page.

Then I searched, and tried some suggestions

window.open('fb://facebook.com/latechnologies', '_system','location=yes');

window.open('fb://pages/latechnologies', '_system','location=yes');

window.open('fb://pages', '_system','location=yes');

None of them are working. Every time it takes to the user wall. How can I simply take the user to the facebook page? Native app or browser doesn't matter. Just want to take the user to the page.....................


Solution

  • For me using the Facebook page id instead of the page name works fine, e.g.

    window.open('https://www.facebook.com/1401408870089080', '_system');