anchor.diff:  
   
   [[]]
  -== Configuring LinkedIn Connectivity
  +== Configuring VKontakte Connectivity
   Spring Social's `ConnectController` works with one or more provider-specific `ConnectionFactory` instances to exchange authorization details with the provider and to create connections. 
  -Spring Social LinkedIn provides `LinkedInConnectionFactory`, a `ConnectionFactory` for creating connections with LinkedIn.
  +Spring Social VKontakte provides `VKontakteConnectionFactory`, a `ConnectionFactory` for creating connections with VKontakte.
   
  -So that `ConnectController` can find `LinkedInConnectionFactory`, it must be registered with a `ConnectionFactoryRegistry`. 
  -The following configuration class uses Spring Social's Java configuration support to register a `ConnectionFactory` for LinkedIn:
  +So that `ConnectController` can find `VKontakteConnectionFactory`, it must be registered with a `ConnectionFactoryRegistry`. 
  +The following configuration class uses Spring Social's Java configuration support to register a `ConnectionFactory` for VKontakte:
   
   ```java
   @Configuration
  
positive.code: = Spring Social LinkedIn Reference
  Craig Walls; Keith Donald; Roy Clarkson
  
  The Spring Social LinkedIn project is an extension to
  http://www.springframework.org/spring-social[Spring Social] that enables
  integration with LinkedIn.
  
  == Introduction
  http://www.linkedin.com[LinkedIn] is a social networking site geared toward professionals. 
  It enables its users to maintain and correspond with a network of contacts they have are professionally linked to.
  
  Spring Social LinkedIn enables integration with LinkedIn with
  `LinkedInConnectionFactory`, a connection factory that can be plugged into
  Spring Social's service provider connection framework, and with an API
  binding to LinkedIn's REST API.
  
  [[]]
  === How to get
  
  The following Gradle dependency will add Spring Social LinkedIn to your
  project:
  
  .build.gradle
  [source,groovy,subs="attributes,verbatim"]
  ----
  compile "org.springframework.social:spring-social-linkedin:{spring-social-linkedin-version}"
  ----
  
  Or in Maven:
  
negative.code: Refer to
  http://docs.spring.io/spring-social/site/docs/1.1.0.RC1/reference/htmlsingle/index.html#connecting[Spring Social's reference documentation] for complete details on configuring `ConnectController` and its dependencies.
  
  == VKontakte API Binding
  Spring Social VKontakte offers integration with VKontakte's REST API with the `VKontakte` interface and its implementation, `VKontakteTemplate`.
  
  To create an instance of `VKontakteTemplate`, you may pass in your application's OAuth 2 access token to the constructor:
  
  ```java
  String accessToken = "..."; // The access token granted after OAuth authorization
  VKontakte vkontakte = new VKontakteTemplate(accessToken);
  ```
  
  If you are using Spring Social's
  http://docs.spring.io/spring-social/site/docs/1.1.0.RC1/reference/htmlsingle/index.html#connectFramework[service provider framework], you can get an instance of `VKontakte` from a `Connection`. For example, the following snippet calls `getApi()` on a connection to retrieve a `VKontakte`:
  
  ```java
  Connection<VKontakte> connection = connectionRepository.findPrimaryConnection(VKontakte.class);
  if (connection != null) {
      VKontakte vkontakte = connection.getApi();
  
      // ... use VKontakte API binding
  }
  ```
  
  Here, `ConnectionRepository` is being asked for the primary connection that the current user has with VKontakte. 
  If a connection to VKontakte is found, it retrieves a `VKontakte` instance that is configured with the connection details received when the connection was first established.
  
  Once you have a `VKontakte` instance, you can perform a several operations against VKontakte's API. 
  The `VKontakte` interface is defined as follows:
  
  ```java
  public interface VKontakte extends ApiBinding {
      public IUsersOperations usersOperations();
      public IWallOperations wallOperations();
      public IFriendsOperations friendsOperations();
      public ISecureOperations secureOperations();
      public ILocationOperations locationOperations();
      public IAudioOperations audioOperations();
      public IGroupsOperations groupsOperations();
      public INewsFeedOperations newsFeedOperations();
      public IUtilsOperations utilsOperations();
  }
  ```
  
  Each method returns sub-APIs, partitioning the VKontakte service API into divisions targeting specific facets of VKontakte functionality. 
  These sub-APIs are defined by interfaces described in <<table_subApis>>.
  
  [[table_subApis]]
  .VKontakte's Sub-APIs
  [options="header",]
  |=======================================================================
  |Sub-API Interface       |Description
  |UsersOperations         |API for performing operations on VKontakte user profiles.
  |WallOperations          |API for performing operations on feeds.
  |FriendsOperations       |API for performing operations with a user's set of friends.
  |SecureOperations        |API for performing secure operations.
  |LocationOperations      |API for performing operations with a location info.
  |AudioOperations         |API for performing operations with audio.
  |GroupsOperations        |API for performing operations with groups.
  |NewsFeedOperations      |API for performing operations with newsfeed.
  |utilsOperations         |API for performing operations with utils.
  |=======================================================================
  
  In addition to the VKontakte-specific sub-APIs described in table <<table_subApis>>, `VKontakte` also has a `restOperations()` method that returns a `RestOperations` (e.g., `RestTemplate`).
  The `RestOperations` returned is instrumented to add an OAuth `Authorization` header for all requests it sends to VKontakte.
  
  What follows is a brief survey of common tasks you may perform with VKontakte and its sub-APIs. 
  For complete details on the Spring Social's entire VKontakte API binding, refer to the JavaDoc.
  