Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class ViewController: UIViewController, VKSdkDelegate {
- var scope = [VK_PER_EMAIL]
- @IBAction func button(sender: AnyObject) {
- VKSdk.authorize(scope)
- }
- override func viewDidLoad() {
- super.viewDidLoad()
- let sdk = VKSdk.initializeWithAppId("5129688")
- sdk.registerDelegate(self)
- }
- override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
- }
- func vkSdkAccessAuthorizationFinishedWithResult(result: VKAuthorizationResult!) {
- print(result)
- print("Hello")
- }
- func vkSdkAccessTokenUpdated(newToken: VKAccessToken!, oldToken: VKAccessToken!) {
- print("vkSdkAccessTokenUpdated")
- }
- func vkSdkUserAuthorizationFailed(result: VKError!) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement