Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using VkNet;
- using VkNet.Enums.Filters;
- using VkNet.Model.RequestParams;
- using VkNet.Model.Attachments;
- using System.Collections.Generic;
- namespace AndreLesson
- {
- class MainClass
- {
- public static void Main (string[] args)
- {
- VkApi api = new VkApi ();
- api.Authorize (new ApiAuthParams{
- ApplicationId = 5511003,
- Login = "79258772720",
- Password = "pk1uNd7v",
- Settings = Settings.All
- });
- var user = api.Users.Get ((long)api.UserId);
- Console.WriteLine (user.FirstName + " " + user.LastName);
- List<MediaAttachment> Attachments = new List<MediaAttachment> ();
- var photo = new Photo ();
- photo.Id = 439451052;
- photo.OwnerId = 148168107;
- Attachments.Add (photo);
- var photo2 = new Photo ();
- photo2.Id = 438147537;
- photo2.OwnerId = 148168107;
- Attachments.Add (photo2);
- api.Wall.Post (
- new WallPostParams{
- OwnerId = (long)api.UserId,
- Message = "Test",
- Attachments = Attachments
- }
- );
- Console.ReadLine ();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement