Open My Page Facebook (in Facebook App) via Side Menu

Hello
I would like to open my Facebook page directly from side menu
I want to opened it in a “Facebook app” if is installed in the device if not => in the browser.
Unfortunately, all of these codes have been tried “useless” as the application opens on the home page only and the page is not displayed.
Please Help Me.

    <ion-item class="item item-icon-right" nav-clear menu-close ui-sref href="https://www.facebook.com/MaziliaCom">
          <i class="icon ion-social-facebook"></i>
          <h2 class="menu-text">Facebook Page</h2>
        </ion-item>
  <ion-item class="item item-icon-right" nav-clear menu-close ui-sref onclick="window.open('fb://profile/1471951636350492', '_system');" >
          <i class="icon ion-social-facebook"></i>
          <h2 class="menu-text">Facebook Page</h2>
 </ion-item>
onclick="window.open('fb://profile/1471951636350492', '_system');"
onclick="window.open('fb://page/1471951636350492', '_system');"
onclick="window.open('fb://pages/1471951636350492', '_system');"
onclick="window.open('fb://page/?id=1471951636350492', '_system');"
onclick="window.open('fb://facewebmodal/f?href=https://www.facebook.com/MaziliaCom/', '_system');"
onclick="window.open('fb://facebook.com/MaziliaCom/', '_system');"
onclick="window.open('facebook://facebook.com/MaziliaCom/', '_system');"

Is there a solution or an experimental project in which it works?

I remember there was a post about this a few weeks ago. Did you use the search function and Google to maybe find this old thread?

I search a lot and tried a lot and could not find a solution
I am a beginner
Please whoever works with it, to give me a solution or give me a “test project” has been applied to it.

It’s no very probable that this changed since February:

I tried these codes

<a href="https://www.facebook.com/MaziliaCom/" onclick="$window.open('fb://profile/1471951636350492', '_system', 'location=no');" >Facebook TEST 1</a>
      <a href="#" onclick="$window.open('fb://profile/1471951636350492', '_system', 'location=no');" >Facebook TEST 2</a>
      <button class="button" ng-click="$window.open('fb://profile/1471951636350492', '_system', 'location=no');">Facebook TEST 3</button>
      <a href="https://www.facebook.com/MaziliaCom/" onclick="window.open('fb://profile/1471951636350492', '_system', 'location=no');" >Facebook TEST 4</a>
      <a href="#" onclick="window.open('fb://profile/1471951636350492', '_system', 'location=no');" >Facebook TEST 5</a>
      <button class="button" ng-click="window.open('fb://profile/1471951636350492', '_system', 'location=no');">Facebook TEST 6</button>
      <ion-item class="item item-icon-right" nav-clear menu-close ui-sref onclick="window.open('fb://profile/1471951636350492', '_system');" >
        <i class="icon ion-social-facebook"></i>
        <h2 class="menu-text">Facebook TEST 7</h2>
      </ion-item>
      <ion-item class="item item-icon-right" nav-clear menu-close ui-sref onclick="$window.open('fb://profile/1471951636350492', '_system');" >
        <i class="icon ion-social-facebook"></i>
        <h2 class="menu-text">Facebook TEST 8</h2>
      </ion-item>
      <ion-item class="item item-icon-right" nav-clear menu-close ui-sref="$window.open('fb://profile/1471951636350492', '_system');" >
        <i class="icon ion-social-facebook"></i>
        <h2 class="menu-text">Facebook TEST 9</h2>
      </ion-item>
      <ion-item class="item item-icon-right" nav-clear menu-close ui-sref="window.open('fb://profile/1471951636350492', '_system');" >
        <i class="icon ion-social-facebook"></i>
        <h2 class="menu-text">Facebook TEST 10</h2>
      </ion-item>

Results

.

Facebook TEST 1 : Open the facebook page in navigator of app
Facebook TEST 2 : Not Work
Facebook TEST 3 Not Work
Facebook TEST 4 : Open the facebook page in navigator of app + open the facebook app … show message: Content not available
Facebook TEST 5 : Open the facebook app … show message: Content not available
Facebook TEST 6 : Not Work
Facebook TEST 7 : Open the facebook app … show message: Content not available
Facebook TEST 8 : Not Work
Facebook TEST 9 : Not Work
Facebook TEST 10 : Not Work

Not one of them open the page in the Facebook application.

Testing something:

fb://profile/1471951636350492
https://www.facebook.com/MaziliaCom/

Ok, so when I open the first link in Safari (so testing on iOS) this opens the FB app to the correct page. When I click the second one, I go to the page in Safari. Strangely, clicking the first link doesn’t work - I have to directly paste it into the address bar.

Edit: Ok, seems to be the forum software’s fault :confused: Can’t make the fb link a real link here.

Ok, still we know the fb://profile/:id format is correct. Now only to find out how to trigger that.

The results above I tried directly on the Android phone :confused:

But neither of them opened the page directly in the application :disappointed:

I have no experience with this at all, but:
Did you look for Cordova plugins that could help?
Did you try opening in inAppBrowser and see what happens?

i have tried inAppBrowser and cordova-plugin-appavailability

the same problem : is Open the facebook app … and show message: Content not available

But when you copy/paste the URL to the normal browser it also opens the Facebook App with the correct page, right?

anyone had luck with this? i’m trying window.open('fb://page/' + facebook_id, '_system', 'location=no');
it does open facebook app, but doesnt show the page.

ps trying it on ionic2

@nylex use page’s numerical id - it would be around 15-16 digit long, to find this go to the facebook page in browser - > view source and find “page_id” , copy it from there and your link will work then

BUSQUEN SU ID DE FACEBOOK
https://findmyfbid.com/

open page facebook, instagram,twiter, send sms to numer whatsapp

import ------- private AppAvailability:AppAvailability,
private InAppBrowser:InAppBrowser,
private platfor:Platform

launchExternalApp(iosSchemaName: string, androidPackageName: string, appUrl: string, httpUrl: string, username: string) {
    let app: string;
    if (this.platfor.is('ios')) {
    console.log("plataforma ios");

      app = iosSchemaName;
    } else if (this.platfor.is('android')) {
      app = androidPackageName;
    console.log("plataforma android");

    } else {
    this.InAppBrowser.create(httpUrl + username, '_system');
    console.log("no es plataforma");
      return;
    }
  
    this.AppAvailability.check(app).then(
      () => { // success callback
  
       this.InAppBrowser.create(appUrl + username, '_system');
    
       console.log("abrir app");

        
      },
      (data) => { // error callback

      this.InAppBrowser.create(httpUrl + username, '_system');
       console.log("ERROR");
       console.log(data);


      }
    );
  }
  
  openInstagram(username: string) {
    this.launchExternalApp('instagram://', 'com.instagram.android', 'instagram://user?username=', 'https://www.instagram.com/', username);
  }
  
  openTwitter(username: string) {
    this.launchExternalApp('twitter://', 'com.twitter.android', 'twitter://user?screen_name=', 'https://twitter.com/', username);
  }
  
  openFacebook(username: string) {
    this.launchExternalApp('fb://', 'com.facebook.orca', 'fb://page/', 'https://www.facebook.com/', username);
  }

  openwhatsapp(number: string) {

    this.launchExternalApp('whatsapp://', 'com.whatsapp', 'whatsapp://send?phone=', 'https://wa.me/', number);

  }