FB.ui permissions.request issue in new OAuth windo

2019-07-22 15:51发布

I having an issue with FB.ui permissions.request window.

FB.ui({
method: 'permissions.request',
perms: 'publish_actions',
display: 'popup'
},function(response) {

// This function is never called ? });

Context : I use the new OAuth window (with timeline), i have configured my apps to work with it. I'm french and use Facebook in French.

First issue : - My callback function is never called ...

Second issue : - The new OAuth window, seem to be not the good window. It's called 'permission request' but inside it is the copy of login window. And no permission request is displayed.

So, my question is : how can i do the permission request in js ? How displaying this window : https://developers.facebook.com/attachment/app_extended_perms.png/ ?

Thanks.

2条回答
Emotional °昔
2楼-- · 2019-07-22 16:11

Disable "Enhanced Auth Dialog" in your app's advance settings and see if it works. If you want to stick with Enhanced Auth Dialog then checkout Setup Auth Dialog Preview for Authenticating user section of this tutorial.

查看更多
Viruses.
3楼-- · 2019-07-22 16:18

The reason you are not seeing it is because the application process has become a two step process.

  1. Being that the person accepts to login into your application.
  2. Being the person accept your extended permission which is where the callback url comes into play.

Documentation can be found here.

So the reason your callback isn't being called is because the two step process. I would suggest making the response attached to second page that is called.

I am not sure how the JS SDK works but it is how I managed to do it.

Goodluck.

查看更多
登录 后发表回答