Quickblox iOS - 登录正常。无法让 Facebook 弹出窗口出现?
Posted
技术标签:
【中文标题】Quickblox iOS - 登录正常。无法让 Facebook 弹出窗口出现?【英文标题】:Quickblox iOS - Logs in Fine. Can't get Facebook popup to appear? 【发布时间】:2014-10-20 19:47:30 【问题描述】:我正在从用户开始研究相关的 Quickblox 模块。我可以验证应用程序并注册一个新帐户并登录。
我尝试使用 Facebook 帐户登录
[QBRequest logInWithSocialProvider:@"facebook" scope:@[] successBlock:[self successBlock] errorBlock:[self errorBlock]];
但什么也没发生。当我使用示例代码尝试它时,我得到一个弹出对话框。 API 隐藏得很好,我无法对弹出窗口进行故障排除。我错过了什么?
控制台输出:
Request URL:https://api.quickblox.com/login.json
Request method: POST
Request parameters:
provider = facebook;
Request headers:
"Content-Type" = "application/json";
"QB-SDK" = "ios 2.0.9";
"QB-Token" = XXXXXXXXXXXXXXXXXX;
"QuickBlox-REST-API-Version" = "0.1.1";
__65-[QBHTTPConnection generateRequestOperation:forPath:usingMethod:]_block_invoke126 -> Redirecting, request: https://www.facebook.com/dialog/oauth?response_type=code&client_id=XXXXXXXXXXX&redirect_uri=http%3A%2F%2Fapi.quickblox.com%2Fauth%2Ffacebook%2Fcallback&state=XXXXXXXXXXX.users.json&display=touch&scope=email, redirectResponse: https://graph.facebook.com/oauth/authorize?response_type=code&client_id=XXXXXXX&redirect_uri=http%3A%2F%2Fapi.quickblox.com%2Fauth%2Ffacebook%2Fcallback&state=XXXXXXXXXXXX.users.json&display=touch&scope=email
__65-[QBHTTPConnection generateRequestOperation:forPath:usingMethod:]_block_invoke126 -> Redirecting, request: https://m.facebook.com/v2.1/dialog/oauth?redirect_uri=http%3A%2F%2Fapi.quickblox.com%2Fauth%2Ffacebook%2Fcallback&state=XXXXXXXXXXX.users.json&scope=email&response_type=code&client_id=XXXXXXXXXXXXXXX, redirectResponse: https://www.facebook.com/dialog/oauth?response_type=code&client_id=365974270237542&redirect_uri=http%3A%2F%2Fapi.quickblox.com%2Fauth%2Ffacebook%2Fcallback&state=XXXXXXXXXX.users.json&display=touch&scope=email
__65-[QBHTTPConnection generateRequestOperation:forPath:usingMethod:]_block_invoke126 -> Redirecting, request: https://m.facebook.com/login.php?skip_api_login=1&api_key=365974270237542&signed_next=1&next=https%3A%2F%2Fm.facebook.com%2Fv2.1%2Fdialog%2Foauth%3Fredirect_uri%3Dhttp%253A%252F%252Fapi.quickblox.com%252Fauth%252Ffacebook%252Fcallback%26state%XXXXXXXXXXXX.users.json%26scope%3Demail%26response_type%3Dcode%26client_id%3D365974270237542%26ret%3Dlogin&cancel_uri=http%3A%2F%2Fapi.quickblox.com%2Fauth%2Ffacebook%2Fcallback%3Ferror%3Daccess_denied%26error_code%3D200%26error_description%3DPermissions%2Berror%26error_reason%3Duser_denied%26state%XXXXXXXXXXXXXXXX.users.json%23_%3D_&display=touch&_rdr, redirectResponse: https://m.facebook.com/v2.1/dialog/oauth?redirect_uri=http%3A%2F%2Fapi.quickblox.com%2Fauth%2Ffacebook%2Fcallback&state=XXXXXXXXXXXX.users.json&scope=email&response_type=code&client_id=XXXXXXXXXXXXXX
Response headers:
"Cache-Control" = "private, no-cache, no-store, must-revalidate";
"Content-Encoding" = gzip;
"Content-Type" = "text/html; charset=utf-8";
Date = "Mon, 20 Oct 2014 19:39:49 GMT";
Expires = "Sat, 01 Jan 2000 00:00:00 GMT";
Pragma = "no-cache";
"Set-Cookie" = "datr=IFpFVEOSkGoM49QHhNpqt37f; expires=Wed, 19-Oct-2016 19:39:49 GMT; Max-Age=63072000; path=/; domain=.facebook.com; httponly, reg_ext_ref=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=.facebook.com, reg_fb_ref=https%3A%2F%2Fm.facebook.com%2Flogin.php%3Fskip_api_login%3D1%26api_key%XXXXXXXXXXX%26signed_next%3D1%26next%3Dhttps%253A%252F%252Fm.facebook.com%252Fv2.1%252Fdialog%252Foauth%253Fredirect_uri%253Dhttp%25253A%25252F%25252Fapi.quickblox.com%25252Fauth%25252Ffacebook%25252Fcallback%2526state%253De1d84aXXXXXX.users.json%2526scope%253Demail%2526response_type%253Dcode%2526client_id%253D365974270237542%2526ret%253Dlogin%26cancel_uri%3Dhttp%253A%252F%252Fapi.quickblox.com%252Fauth%252Ffacebook%252Fcallback%253Ferror%253Daccess_denied%2526error_code%253D200%2526error_description%253DPermissions%252Berror%2526error_reason%253Duser_denied%2526state%253De1d84ad000164XXXXXXXXXb40ab6b321.users.json%2523_%253D_%26display%3Dtouch; path=/; domain=.facebook.com, m_ts=1413833989; path=/; domain=.facebook.com; httponly";
p3p = "CP=\"Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p\"";
"x-content-type-options" = nosniff;
"x-fb-debug" = "BImF8RRsnETruM0QYD0fBV3KszW1T4VMWl1Btxl3//5CcsLSJgLDG9Sz99coS+qYlDsx53SKC6p***t+WVzhFA==";
"x-frame-options" = DENY;
"x-xss-protection" = 0;
Response JSON: (null)
【问题讨论】:
【参考方案1】:嗯,现在我觉得很傻。我继续在应用程序上工作,然后我发现对话框屏幕实际上在顶部 viewController 下弹出。
【讨论】:
以上是关于Quickblox iOS - 登录正常。无法让 Facebook 弹出窗口出现?的主要内容,如果未能解决你的问题,请参考以下文章
无法使用 quickblox(iOS)登录 facebook
在 IOS 中使用 QuickBlox 视频聊天,无需登录或密码