Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.....................

like image 940
AtanuCSE Avatar asked May 22 '14 09:05

AtanuCSE


People also ask

How do I make Facebook links open on the Facebook app?

Open Facebook, tap Menu, then App Settings, and make sure the "Links open externally" switch is off. What version of the Facebook app do you have? I'm on 49.0. 0.12.


Video Answer


2 Answers

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

window.open('https://www.facebook.com/1401408870089080', '_system');
like image 62
jonas Avatar answered Sep 17 '22 23:09

jonas


I know this is old but I had this problem too, and the accepted answer is through the browser, not through the FB app.

Answer = fb://profile/12323435435

On IOS pages are under 'profile'

fb://profile/   - FOR IOS
fb://page/      - FOR ANDROID

    <a onclick="window.open('fb://profile/INSERT_FB_ID_HERE','_system')"> 
                                        Your text or button here </a>

You can find a FB profile or page here : https://findmyfbid.com

like image 24
Michael Avatar answered Sep 19 '22 23:09

Michael