F
F
Febel2019-12-06 02:37:06
C++ / C#
Febel, 2019-12-06 02:37:06

How to send photos from a computer to a message to another person VK?

I'm trying to write a bot using VKNET in C#.
The bot already works like that, but I want it to send some screenshots at the user's request.
Only now I don’t know how to do it ... It seems to me that this is exactly what I need. link
I copied the example. Launched, like downloaded like no. I don't know how to check.
5de993ba0d651358571611.png
In general, after that I'm at an impasse. Please tell me what to do next?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2019-12-06
@vabka

Try using HttpClient or vknet
instead of WebClient. To send a picture in a message, you first need to upload it to the vk server, and then put a string in the format $"photo{user id, from which name you uploaded the photo} to the attachments parameter of the messages.send method _{id photo}"
Link to VK documentation
Link to Vk.NET documentation (there are examples here)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question