0

在我的应用程序中,可以使用 facebook 登录并且工作正常。问题是它正在打开浏览器而不是 facebook 应用程序进行身份验证。

FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login logInWithReadPermissions:permissions handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
    if (error) {
        // Process error
        NSLog(@"Permission denied");
        UIAlertView *alrt = [[UIAlertView alloc]initWithTitle:@"Error Occured" message:@"Permission Not Granted" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil , nil];
        [alrt show];
    }
    else if (result.isCancelled)
    {
        // Handle cancellations
        UIAlertView *alrt = [[UIAlertView alloc]initWithTitle:@"Network Error" message:@"Try Again Later" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil , nil];
        [alrt show];
        [self dismissViewControllerAnimated:NO completion:nil];
    }

那么知道该怎么做吗?

4

0 回答 0