FB.ui permissions.request issue in new OAuth window

这一生的挚爱 提交于 2019-12-11 05:16:11

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/7847029/fb-ui-permissions-request-issue-in-new-oauth-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!