[英]Twitter Helper class is not present in System.Web.Helpers
I am trying to use Asp .net Webpages for my site. 我正在尝试将Asp .net网页用于我的网站。 I am following W3Schools' tutorial for this.
我正在关注W3Schools的教程 。 I started with Empty Asp .net application project and added a cshtml page to it.
我从Empty Asp .net应用程序项目开始,并向其中添加了一个cshtml页面。 After too many trouble I finally installed System.Web.Helpers package from nuget and it's working for GamerCard.
经过太多的麻烦之后,我终于从nuget安装了System.Web.Helpers软件包,它适用于GamerCard。
The problem is I am not able to use Twitter helpers at all. 问题是我根本无法使用Twitter帮助程序。 I am getting the following error when I use
Twitter.Profile()
使用
Twitter.Profile()
时出现以下错误
Compiler Error Message: CS0103: The name 'Twitter' does not exist in the current context
编译器错误消息:CS0103:当前上下文中不存在名称“ Twitter”
I used Object Browser to check the System.Web.Helpers assembly and to much of my surprise there was no Twitter class at all. 我使用对象浏览器检查System.Web.Helpers程序集,令我惊讶的是根本没有Twitter类。 I can see Facebook, GamerCard, Gravatar etc. classes, but no sign of Twitter there.
我可以看到Facebook,GamerCard,Gravatar等类,但那里没有Twitter的迹象。 Acc.
加。 to this page , Twitter class should be present there too.
到此页面 ,Twitter班也应该在那里。
Any idea what did I miss? 知道我想念什么吗?
Found the answer on Codeplex project site of Asp.net. 在Asp.net的Codeplex项目站点上找到了答案。 The issue mentioned here , stats that due to the retirement of Twitter API V1, the Twitter helper code was broken, hence Microsoft removed it from the
Microsoft.Web.Helpers
namespace completely. 这里提到的问题表明,由于Twitter API V1的停用,Twitter帮助程序代码已损坏,因此Microsoft完全从
Microsoft.Web.Helpers
命名空间中删除了该代码。 More info can be found in the issue text. 可以在问题文本中找到更多信息。
To use twitter helpers, the issue mentions a newer and more complex method which you can see here . 要使用Twitter帮助程序,本期提到了一种更新,更复杂的方法,您可以在此处查看 。 Didn't try it yet, but I hope it'll work.
尚未尝试过,但我希望它能起作用。
Thanks @gunr2171 for helping and pushing in the right direction :-) 感谢@ gunr2171对正确方向的帮助和推动:-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.