Install-Package kasthack.vksharp
- .NET
- 4.0
- 4.5
- 4.6
- Mono
- Anything 4.0+ compatible. I've used 4.2 successfully.
- Xamarin
- 4.* profile. PCL is not supported yet. Use shared project if you are building a cross-platform forms app.
-
Register app at https://vk.com/editapp?act=create
-
Get OAuth authorize uri
var redirect_uri = Token.GetOAuthURL( APP_ID, // APP ID: shown on app's properties page PERMISSIONS // Permissions: VKPermission.*, something like VKPermission.Offline | VKPermission.Photos );
-
Show authorization page to user.
-
Build token from redirect uri.
var token = Token.FromRedirectUrl( REDIRECT_URL );
-
Use token
var api = new Api(); api.AddToken(token);
-
Execure requests
var users = await api.Users.Get(1);
-
???
-
Profit
Lurk here