Slide 42
Slide 42 text
OAuthSwift
oauthswift = OAuth2Swift(
consumerKey: "********",
consumerSecret: "********",
authorizeUrl: "https://api.instagram.com/oauth/authorize",
responseType: "token"
)
let handle = oauthswift.authorize(
withCallbackURL: URL(string: "oauth-swift://oauth-callback/
instagram"),
scope: "likes+comments", state:"INSTAGRAM") { result in
switch result {
case .success(let (credential, response, parameters)):
print(credential.oauthToken)
case .failure(let error):
print(error.localizedDescription)
}
}