Facebook Connect Bug? (将授权后的URL放入窗口而不是OnLogin回调) [英] Facebook Connect Bug? (Post-Authorise URL Being Put in Window Instead of OnLogin Callback)

查看:427
本文介绍了Facebook Connect Bug? (将授权后的URL放入窗口而不是OnLogin回调)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Facebook Connect进行身份验证的ASP.NET网站 - 使用JavaScript API和Facebook Connect FBML按钮。



这是常规流程


  1. 显示对话框请求用户登录

  2. 对话框请求用户获取基本信息权限的权限

  3. 弹出窗口已关闭

  4. 我提供的回调函数onlogin被解雇。

所有的好。



现在 - 我认为是一个错误:用户已经已经通过Facebook认证,但尚未授权我的应用程序。



这是流程:


  1. 显示对话框请求用户的权限基本信息权限

  2. 弹出式窗口的URL更改为 http://rootofmysite.com/?installed=1&token=3e3920d309

  3. 用户不知道发生了什么,并且onlogin回调未被触发。

所以,弹出窗口被替换为我的原始网站,而在querystring中是OAuth令牌?这看起来是使用在Facebook应用程序设置中的后授权回拨网址,但已被删除。无论如何,我不在乎这个URL - 我使用客户端JavaScript API请求许可/授权,确定很多人都可以。



我明白用户已经被认证,所以他们不需要再次登录,但是我不明白的是a)为什么没有调用onlogin事件处理程序,以及b)为什么在地球上他们用我的站点和URL中的OAuth令牌?



目前,我正在尝试一个创造性的解决方法,我检测到此URL并关闭弹出窗口并调用我的onlogin手动处理(Facebook应该做什么)。



仍然很狡猾。



编辑



这是另一个bug人。

解决方案

这是一个(未经确认的)错误。



http://bugs.developers.facebook.net/ show_bug.cgi?id = 12260



希望获得更多的投票,让它得到修正 - 投票人!


$ b $在此期间,我(尝试)使用以下创意解决方案:


  1. 向我的默认添加逻辑。

  2. 重定向到我的页面,FacebookInboundAuthorization.aspx,保留查询字符串。

  3. 加载注册一些JavaScript来关闭弹出窗口,并手动激活我的按钮的onlogin事件处理程序。

编辑



为了澄清我的上述内容,我并不是说投票人,在这里投票支持我的答案,我的意思是投票Bugzilla上的bug(使FB接受它作为一个问题并解决它)。


I have a ASP.NET web site which uses Facebook Connect for authentication - using the JavaScript API and the Facebook Connect FBML Button.

Here is the regular flow of events for a "Connect with Facebook" button click, when user isnt logged into Facebook.

  1. Dialog is shown requesting user to login
  2. Dialog requests permission from the user for basic info permission
  3. The popup is closed
  4. The callback function i supplied for "onlogin" is fired.

All good.

Now - here's what i think is a bug: the user is already authenticated to Facebook, but has not authorised my app.

This is the flow:

  1. Dialog is shown requesting permission from the user for basic info permission
  2. The URL for the popup changes to http://rootofmysite.com/?installed=1&token=3e3920d309
  3. The user is left wondering what is going on, and the onlogin callback is NOT fired.

So, the popup window is replaced with my original site, and in the querystring is the OAuth token? This looks to be the "Post-Authorise Callback" URL which used to be in the Facebook Application Settings - but has been removed. Anyway, i dont care about this URL - i request permissions/authorization using the client-side JavaScript API, as im a sure a lot of people do.

I understand the user is already authenticated, so they wouldn't need to login again, but what i dont understand is a) why the "onlogin" event handler is not called, and b) why on earth are they replacing THEIR dialog with my site and the OAuth token in the url?

At the moment, i am trying to do a "creative workaround" where i detect this URL and close the popup and call my "onlogin" handler manually (what Facebook SHOULD be doing).

Still, quite dodgy.

EDIT

It's another bug peoples. Please vote for it so they fix it.

解决方案

It's a (unconfirmed) bug.

http://bugs.developers.facebook.net/show_bug.cgi?id=12260

Hopefully it gets more votes so it gets fixed - vote people!

In the meantime, i am (attempting) to employ the following 'creative workaround':

  1. Add logic to my Default.aspx page to detect that URL they are redirecting to in the popup.
  2. Redirect to my page, FacebookInboundAuthorization.aspx, preserving querystring.
  3. On load of that page, register some JavaScript to close the popup and manually fire the "onlogin" event handler for my button.

EDIT

To clarify my above, i didnt mean "vote people" as in to vote for my answer here, i meant vote for the bug on Bugzilla (so that FB accept it as an issue and fix it).

这篇关于Facebook Connect Bug? (将授权后的URL放入窗口而不是OnLogin回调)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆