Inherits from NSObject
Conforms to UIWebViewDelegate
Declared in VKConnector.h

Overview

The main purpose of this class is to process user authorization and obtain access token which then will be used to perform requests from behalf of current user.

Example:

[[VKConnector sharedInstance] startWithAppID:@"12345567"
                              permissions:@[@"wall"]
                              webView:webView
                              delegate:self];

Tasks

Properties

Class methods

User authorization

Cookies

  • – clearCookies

    Removes all cookies which were obtained after user has authorized VK application. This method is used to log out current user.

Properties

appID

Application’s unique identifier

@property (nonatomic, strong, readonly) NSString *appID

Declared In

VKConnector.h

delegate

Delegate

@property (nonatomic, weak, readonly) id<VKConnectorDelegate> delegate

Declared In

VKConnector.h

permissions

Permissions

@property (nonatomic, strong, readonly) NSArray *permissions

Declared In

VKConnector.h

Class Methods

sharedInstance

Returns shared instances of VKConnector class.

+ (id)sharedInstance

Declared In

VKConnector.h

Instance Methods

clearCookies

Removes all cookies which were obtained after user has authorized VK application. This method is used to log out current user.

- (void)clearCookies

Declared In

VKConnector.h

startWithAppID:permissons:webView:delegate:

Starts user authorization process.

- (void)startWithAppID:(NSString *)appID permissons:(NSArray *)permissions webView:(UIWebView *)webView delegate:(id<VKConnectorDelegate>)delegate

Parameters

appID

application’s unique identifier

permissions

array of permissions (wall, friends, audio, video etc)

webView

UIWebView which will be used to display VK authorization page

delegate

delegate which will receive notifications

Declared In

VKConnector.h