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


#1

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?


#2

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?


#3

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.


#4

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


#5

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.


#6

Testing something:

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


#7

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.


#8

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


#9

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

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


#10

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?


#11

i have tried inAppBrowser and cordova-plugin-appavailability

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


#12

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


#13

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


#14

@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