FB.ui ({method: "oauth"}) vs FB.login () in the page tab app

We are currently using the OAuth dialog via the JavaScript SDK in our page tab application to request permissions instead of FB.login.

The reason for this is that FB.login () launches a new window, while FB.ui ({method: 'oauth'}) displays a nice looking modal dialog. We find the OAuth dialog more friendly to our users.

However, the documentation for the OAuth method states that it does not use it directly in the JavaScript SDK: http://developers.facebook.com/docs/reference/dialogs/oauth/ "The OAuth dialog should not be called directly from the JavaScript SDK. Instead, use FB.login for this purpose. "

Is there an “acceptable” way to request application permissions from a page tab application through a modal dialog, and not through a popup?

+5
source share
1 answer

During this response, Facebook does not allow requesting user permissions in the frame because it sets the "X-Frame-Options" to "DENY". Which makes sense as it can be used for XSS suggestions.

Calling either FB.uior FB.loginusing display: "iframe"returns the same error:

FB.ui({method: "oauth", display: "iframe"});

FB.login(function(response){}, {display: "iframe"});

'https://www.facebook.com/dialog/oauth?app_id=XXXX&channel=XXXX&sdk=joey' , 'X-Frame-Options' 'DENY'.

0

All Articles