             } else {
                 assert(!reads.isEmpty || !pubs.isEmpty)
                 
-                func finish(ac: FBSDKAccessToken!) { self.finish_ok(command, result: ac.tokenString) }
+                func finish(_ ac: FBSDKAccessToken!) { self.finish_ok(command, result: ac.tokenString as AnyObject?) }
                 
                 if !reads.isEmpty {
                     self.accessToken.getCurrent({ self.permRead(command, permissions: reads) }, taker: finish)

class FBConnect: CDVPlugin {
    // MARK: - Plugin Commands
    
    func login(command: CDVInvokedUrlCommand) {
        fork {
            var perms = command.arguments.map { $0 as! String }
            if perms.count < 1 {

        }
    }
    
    func logout(_ command: CDVInvokedUrlCommand) {
        fork {
            log("Logout now!")
            FBSDKLoginManager.init().logOut()
