I am new on Swift and iOS and there is something interesting happening here.

In my `ViewController` I am using this code and its working great.

```
let loginManager = LoginManager()

loginManager.logIn([ .publicProfile, .email ], viewController: self) { loginResult in
    switch loginResult {
    case .failed(let error):
        print(error)
    case .cancelled:
        print("User cancelled login.")
    case .success(let grantedPermissions, let declinedPermissions, let accessToken):
        print("Logged in!\(accessToken)")
    }
}

```

When I am putting it in the other class such as `LoginService` I got an error 

> 
> Type of expression is ambiguous without more context
> 
> 
> 

Here is the funkction on LoginService class

```
  func doFaceBookLogin(viewController: UIViewController?) {
        let loginManager = LoginManager()

        loginManager.logIn([ .publicProfile, .email ], viewController) { loginResult in
            switch loginResult {
            case .failed(let error):
                print(error)
            case .cancelled:
                print("User cancelled login.")
            case .success(let grantedPermissions, let declinedPermissions, let accessToken):
                print("Logged in!\(accessToken)")
            }
        }
    }

```

What I did wrong here?