Facebook page tab iframe app not working

2019-07-04 03:43发布

问题:

So I've followed the instructions in all the other questions.

I did this:

https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL

Now i just get a blank page when i click the page tab link (from admin login or not as admin). it goes to facebook.com/mypage/app_{my_id} as expected but does nothing.

All the links https or not https WORK FINE! Even on the page settings/apps i can click "goto app" and it works fine!

The page tab settings in my application settings do not point to the apps.facebook.com/myapp URL as suggested by another thread. It is NOT setup as a FBML page.

Once and a while I get

App Temporarily Unavailable
Parse errors:
FBML Error (line 6): illegal tag "body"

however, this is an iframe app, not an FBML app.

Driving me crazy, all the other questions here have no proper solution for this.

Is there a solution? I don't really have code to post, as it works fine and dandy accessing the app from any means except the page tab option. That is, the app works fine as a normal iframe app, it's just the page-tab URL is not making the last step.

Here is the app settings. It is clearly not set to FBML.

回答1:

I'm almost 100% sure this is the FBML settings, check both of these settings for the app are not set to FBML - unless you can give us the App ID to check, nobody can give an absolutely 100% sure answer

1) On the 'advanced' tab, the setting for 'canvas mode' - this will not appear for apps created after March 2011

2) There was a setting for 'Page Tab iframe' in the 'Migrations' setting of the Advanced Tab. This controls whether or not FBML is used with the page tabs of your app - if set to disabled, the app is still using FBML for its page tabs

You can also check second setting via the API, for my example app there, the canvas setting can be retrieved via a call to /APPLICATION_ID/?fields=migrations&access_token=APP_ACCESS_TOKEN

The return value is a structure of the migrations the app can set and their values:

{
  "migrations": {
    "secure_stream_urls": false, 
    "expiring_offline_access_tokens": false, 
    "december_rollup": false, 
    "page_tab_iframe": false, 
    //[ SNIPPED OTHER MIGRATIONS ]
  }, 
  "id": " // SNIPPED APP ID", 
  "type": "application"
}


回答2:

I just had this problem, the problem was that I had an secure URL (https) in both the canvas and secure canvas. On unsecured connections, the empty rectangle was a result. Both an secure (https) and unsecured (http) URL is required.