我的问题如下:我注意到有些尝试登录我的应用的用户无法登录。它可能只有20%,我不确定他们使用哪种手机。我注意到iPhone和Android手机上的观察结果。
我相信这可能是由于我在facebook控制台中的一个参数,但我不确定是哪一个。
之前有没有人进入过这种情况? 目前我可以看到facebook上的API统计信息,当用户尝试登录时看到错误,但我不知道如何获取错误信息
目前看起来这些用户在登录时总是会遇到facebook API的错误情况。
目标C代码:
if([FBSDKAccessToken currentAccessToken] != nil)
[self loginUser];
else{
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
login.loginBehavior = FBSDKLoginBehaviorSystemAccount;
// THIS PART ALWAYS SWAP FROM MY APP TO 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代码:
FacebookSdk.sdkInitialize(getApplicationContext());
LoginManager loginManager = LoginManager.getInstance();
callbackManager = CallbackManager.Factory.create();
// Register the callback manager to the facebook login manager
loginManager.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
// If the callback is sucessfull then we log the user in
public void onSuccess(LoginResult loginResult) {
logUserIntoApp();
}
@Override
// If the callback specify that the user cancel the facebook login
public void onCancel() {
Mint.logExceptionMessage("onCancelFacebookLogin", null, new Exception("onCancelFacebookLogin"));
setFinResult(CANCEL);
}
@Override
// If there was an error, we specify that there was an error during the facebook login
public void onError(FacebookException exception){
Mint.logExceptionMessage("onErrorFacebookLogin", null, new Exception("onErrorFacebookLogin"));
setFinResult(FAIL);
}
});
// First check if the user is already logged in, and if he is then logged in automatically in TMO
if (isLogedIn()) logUserIntoApp();
// Otherwise login the user with the required permissions
else loginManager.logInWithReadPermissions(this, Arrays.asList("email", "user_photos", "user_birthday", "public_profile"));
以下是商店链接: https://play.google.com/store/apps/details?id=pro.appus.takemeout https://itunes.apple.com/gb/app/tmo-dating/id1032349052?mt=8
对此有任何帮助将非常感激。感谢