简体   繁体   中英

Ionic cannot open facebook profile page from app

I want to open Facebook's profile page that corresponds to a user in ionic application. I use cordovaInAppBrowswer plugin.

url = 'fb://profile/vahid.vdn';
var options = {
    location: 'yes',
    clearcache: 'yes',
    toolbar: 'yes'
};
$cordovaInAppBrowser.open( url, '_system', options ).then(function(event) {
    // facebook app is already installed and opened successfully 
})
.catch(function(event) {
    // facebook app isn't installed in this device
    url = 'https://facebook.com/vahid.vdn'
    $cordovaInAppBrowser.open( url, '_system', options );
}

This just open Facebook's home page in the Facebook app. (Platform: iOS )

Any idea?

在Facebook上尝试一下,

url = 'fb://profile?id=vahid.vdn';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM