android - Facebook login do not work on some devices -
my problem following: notice users trying login in app fail login. happens maybe 20% of them , not sure phone use. notice observation on iphone , android phones.
i believe maybe due 1 of parameter in facebook console, not sure one.
did of entered in scenario before? @ moment can see api stat facebook see errors when users try login not know how error information
at moment looks users end in error case of facebook api when logging in.
objective c code:
if([fbsdkaccesstoken currentaccesstoken] != nil) [self loginuser]; else{ fbsdkloginmanager *login = [[fbsdkloginmanager alloc] init]; login.loginbehavior = fbsdkloginbehaviorsystemaccount; // part swap app facebook app [login loginwithreadpermissions:@[facebook_email, facebook_publicprofile] handler:^(fbsdkloginmanagerloginresult *result, nserror *error) { if (error){ [login logout]; } else if ([result iscancelled] == yes){ [login logout]; } else{ [self loginuser]; } }]; }
android code:
facebooksdk.sdkinitialize(getapplicationcontext()); loginmanager loginmanager = loginmanager.getinstance(); callbackmanager = callbackmanager.factory.create(); // register callback manager facebook login manager loginmanager.registercallback(callbackmanager, new facebookcallback<loginresult>() { @override // if callback sucessfull log user in public void onsuccess(loginresult loginresult) { loguserintoapp(); } @override // if callback specify user cancel facebook login public void oncancel() { mint.logexceptionmessage("oncancelfacebooklogin", null, new exception("oncancelfacebooklogin")); setfinresult(cancel); } @override // if there error, specify there error during facebook login public void onerror(facebookexception exception){ mint.logexceptionmessage("onerrorfacebooklogin", null, new exception("onerrorfacebooklogin")); setfinresult(fail); } }); // first check if user logged in, , if logged in automatically in tmo if (islogedin()) loguserintoapp(); // otherwise login user required permissions else loginmanager.loginwithreadpermissions(this, arrays.aslist("email", "user_photos", "user_birthday", "public_profile"));
here store links too: https://play.google.com/store/apps/details?id=pro.appus.takemeout https://itunes.apple.com/gb/app/tmo-dating/id1032349052?mt=8
any on appreciated. thanks
Comments
Post a Comment