I\'m new in telegram bot and try to send photo to user with this code:
await Bot.SendPhotoAsync(update.Message.Chat.Id, \"http://182.126.201.42/\" + \"i
Accoding to example you can sendPhoto:
await Bot.SendChatActionAsync(message.Chat.Id, ChatAction.UploadPhoto);
const string file = @"<FilePath>";
var fileName = file.Split('\\').Last();
using (var fileStream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read))
{
var fts = new FileToSend(fileName, fileStream);
await Bot.SendPhotoAsync(message.Chat.Id, fts, "Nice Picture");
}
Documentation: https://mrroundrobin.github.io/telegram.bot/html/M_Telegram_Bot_TelegramBotClient_SendPhotoAsync_3.htm
The problem can be originated from the following issues:
You can start with the former one.