Open facebook page in facebook Ios + ionic app
Purpose: - Open facebook page url in facebook app
I am using ionic version 1.6
I have tried
<a ng-click="openFb()">
<img src="img/fb.png" alt="" width="auto" height="auto">
</a>
In my controller file, I have my function below.
$scope.openFb = function() {
window.open('fb://page/1372537532795807', "_system");
};
Above after searching, I found that if you want to open the page, you have to go through fb:://page[page_id]
thanfb:://profile/[page_id]
But when I click the button, nothing happens without even opening the installed facebook app on my device.
Looking forward to some help.
Thank you for the advanced.
source to share
Solution: add url schemes to whitelist
Just open the .plist app (usually platform / ios // - Info.plist) with an editor and add the following code with the required schemas.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fb</string>
</array>
Apple changed the canOpenURL method on iOS 9. Apps validating URL schemes on iOS 9 and iOS 10 must declare those URL schemes as they are submitted to Apple. The article Quick Take on Changes to the iOS 9 URL Scheme details.
Link link : - https://github.com/ohh2ahh/AppAvailability/issues/22
source to share