Open facebook page link in browser or native app correctly IOS cordova
Solution 1
For me using the Facebook page id instead of the page name works fine, e.g.
window.open('https://www.facebook.com/1401408870089080', '_system');
Solution 2
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
Comments
-
AtanuCSE about 2 years
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.....................
-
AtanuCSE over 9 yearsDon't you think your answer and jonas's answer are exactly the same!
-
Carlos Galeano over 9 yearsSorry i try to help you. :) if you know about the InAppBrowser plugin i will delete my amswer. Have a nice day!
-
Andrei Cojea over 9 yearsThis works only with numeric IDs, here's a tool you can use to get that ID: findmyfacebookid.com
-
toto_tata about 8 yearsOpens in browser ; not in the FB app.
-
Dumindu Madushanka almost 8 yearsIt stops working when facebook app is available. any suggestion ? Tried 'fb://pages/1401408870089080' but not working.
-
Dumindu Madushanka almost 8 yearshere I found the new list for IOS native app page open. stackoverflow.com/questions/5707722/…