2017-05-31 108 views
0

我在我的asp.net项目中使用Telegram Bot Api Library for .nethttps://www.nuget.org/packages/Telegram.Bot/如何获取webhook页面的更新?

设置webhook后,我想从webhook reciver页面获取更新。我不能转换发布的json数据到Update对象。 请帮助解决它。

这里是我的代码:

Dim jsonData As String = New StreamReader(Request.InputStream).ReadToEnd 
Dim up = Update.FromString(Newtonsoft.Json.JsonConvert.DeserializeObject(jsonData)) 

回答

1

通过编辑代码,问题就迎刃而解了:

Dim jsonData As String = New StreamReader(Request.InputStream).ReadToEnd 
Dim up = Update.FromString(jsonData) 
相关问题