                     }, failure: failure)
             }
             
-            let authorizeURL = NSURL(string: "/oauth/authorize", relativeToURL: TwitterURL.api)
-            let queryURL = NSURL(string: authorizeURL!.absoluteString + "?oauth_token=\(token!.key)")!
-            NSWorkspace.sharedWorkspace().openURL(queryURL)
+            let authorizeURL = URL(string: "/oauth/authorize", relativeTo: TwitterURL.api)
+            let queryURL = URL(string: authorizeURL!.absoluteString! + "?oauth_token=\(token!.key)")!
+            NSWorkspace.shared().open(queryURL)
         }, failure: failure)
     }
     #endif

     - OS X only
     */
    #if os(OSX)
    public func authorizeWithCallbackURL(callbackURL: NSURL, success: TokenSuccessHandler?, failure: FailureHandler? = nil) {
        self.postOAuthRequestTokenWithCallbackURL(callbackURL, success: { token, response in
            var requestToken = token!
    
//            NotificationCenter.default().ad
            NSNotificationCenter.defaultCenter().addObserverForName(CallbackNotification.notificationName, object: nil, queue: NSOperationQueue.mainQueue()) { notification in
                NSNotificationCenter.defaultCenter().removeObserver(self)
                let url = notification.userInfo![CallbackNotification.optionsURLKey] as! NSURL
                let parameters = url.query!.parametersFromQueryString()
                requestToken.verifier = parameters["oauth_verifier"]
                

            NotificationCenter.default().addObserver(forName: .SwifterCallbackNotification, object: nil, queue: .main()) { notification in
                NotificationCenter.default().removeObserver(self)
                presentingViewController?.presentedViewController?.dismiss(animated: true, completion: nil)
                let url = notification.userInfo![CallbackNotification.optionsURLKey] as! URL
                
                let parameters = url.query!.parametersFromQueryString()
                requestToken.verifier = parameters["oauth_verifier"]
