Search code examples
iosfacebookquickblox

Quickblox iOS - Logs in Fine. Can't get Facebook popup to appear?


I'm working my way through the relevant Quickblox modules starting with users. I can authenticate an application and register a new account and login.

I tried to login with a Facebook account using

[QBRequest logInWithSocialProvider:@"facebook" scope:@[] successBlock:[self successBlock] errorBlock:[self errorBlock]];

but nothing happens. When I try it with the sample code, I get a popup dialog. The API is so well hidden, I can't troubleshoot the popup. What am I missing?

The console output:

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+qYlDsx53SKC6pvpNt+WVzhFA==";
"x-frame-options" = DENY;
"x-xss-protection" = 0;
}
Response JSON: (null)

Solution

  • Well, now I feel silly. I kept working on the app and then I discovered that the dialog screen actually popped UNDER the top viewController.