Load a facebook page within Page container?

I want to load a facebook page in my app within the Page container so that the app’s navigation bar is still present. I’m using framework7-vue, and this is the code I tried:

export default {
on: {
pageInit(e) {
const self = this;
const app = self.$f7;
const $ = self.$$;
            method: 'GET',
            url: 'https://m.facebook.com/RANDOM.ORG',
            complete: function(xhr, status) {
                console.log(xhr, status);
    pageBeforeRemove() {
      let self = this;

It fails with a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”
I know this is a CORS issue and I have tried everything from setting crossDomain to true, and even tried using the same headers that my browser uses when I load the page manually. Is there any way to do this? I simply want to load a facebook page with the navigation bar of my app still present.

No, it is not possible, you can’t pass through CORS security here, facebook server doesn’t allow such requests, and why you want to do it? Sounds like a scam thing. If you want to display facebook page to user you better use cordova inapp browser https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/

1 Like

Thank you for the reply!! I will check out this plugin. The reason I wanted to do it because many apps have a “social media” section. For example, the app of my local library, I tap on their “facebook” button and it opens up their facebook page within the app (the idea is you can see what’s going on in their facebook without leaving their app). I thought this was a common pattern? I am not a scammer!!! :rofl:

1 Like