SwiftOAuth2OAuth2 的 Swift 實(shí)現(xiàn)
SwiftOAuth2 是 OAuth2 的 Swift 實(shí)現(xiàn)。
使用
首先要創(chuàng)建一個 CROAuth2Client 對象:
// From a UIViewController (used to present the authentication webview if necessary) CROAuth2Client.clientWithPresentingController(self)
簡單的查詢訪問 token:
self.client!.retrieveAuthToken({ (authToken) -> Void in
if let optionnalAuthToken = authToken {
println("Received access token " + optionnalAuthToken)
}
})評論
圖片
表情
