OAuth Swift : Dribbble 应用的 "callback" URL 是什么?

OAuth Swift : What "callback" URL for Dribbble app?

我正在制作一个使用 OAuthSwift 进行 Dribbble 登录的应用程序,一切顺利(当然我在 Dribbble 开发者页面上设置了应用程序并且我有我的客户端 ID 和密码)。

但是当它询问用户是否接受权限时,回调不起作用。

我做了我的 URL 回调 "DribbbleChat2://oauth-callback",我在 Xcode Infos "oauth-callback"

中做了一个 URL 方案

你能帮我把认证重定向到我的应用程序吗?

这是我的回调函数 URL

func doOAuthDribbble(){
    let oauthswift = OAuth2Swift(
        consumerKey:    Dribbble["consumerKey"]!,
        consumerSecret: Dribbble["consumerSecret"]!,
        authorizeUrl:   "https://dribbble.com/oauth/authorize",
        accessTokenUrl: "https://dribbble.com/oauth/token",
        responseType:   "code"
    )
    oauthswift.authorizeWithCallbackURL( NSURL(string: "DribbbleChat2://oauth-callback")!, scope: "public+write+comment+upload", state: "", success: {
        credential, response in
        self.showAlertView("Dribbble", message: "oauth_token:\(credential.oauth_token)")
        // Get User
        var parameters =  Dictionary<String, AnyObject>()
        oauthswift.client.get("https://api.dribbble.com/v1/user?access_token=\(credential.oauth_token)", parameters: parameters,
            success: {
                data, response in
                let jsonDict: AnyObject! = NSJSONSerialization.JSONObjectWithData(data, options: nil, error: nil)
                println(jsonDict)
            }, failure: {(error:NSError!) -> Void in
                println(error)
            })
        }, failure: {(error:NSError!) -> Void in
            println(error.localizedDescription)
    })
}

您的 URL Schemes 设置为 oauth-callback,而不是您预期的 DribbbleChat2