Advertisement
Guest User

Untitled

a guest
May 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.39 KB | None | 0 0
  1.     func authorize(response: @escaping Handler<Result<Void, Error>>) {
  2.         type(of: self).authorize(
  3.             withPermissions: ["VALUABLE_ACCESS", "LONG_ACCESS_TOKEN"],
  4.             success: {response(Result.success(()))},
  5.             error: {
  6.                 guard let error = $0 as NSError? else { return }
  7.                 response(.failure(error))
  8.             }
  9.         )
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement