Twitter整合(Twitter Integration)

编程入门 行业动态 更新时间:2024-10-15 22:25:39
Twitter整合(Twitter Integration)

我在Visual Studio 2013 Preview中创建了一个MVC 5应用程序。 我想在我的MVC应用程序中集成Twitter。 我使用过Package Manager中的Twitter.Helper。 但是,当我的应用程序在浏览器上运行时,没有任 这是我在Index.cshtml文件中的代码:

<div class="span4"> <h2>My Profile</h2> @TwitterGoodies.Profile("Sandeep Sharma") </div>

I am creating a MVC 5 application in Visual Studio 2013 Preview. I want to integrate Twitter in my MVC application. I have used Twitter.Helper from Package Manager. But when my application runs on the browser nothing happen. Here is my code in Index.cshtml file:

<div class="span4"> <h2>My Profile</h2> @TwitterGoodies.Profile("Sandeep Sharma") </div>

最满意答案

如果您查看浏览器控制台,您将看到错误:

TWITTER WIDGET: The Twitter API v1.0 is deprecated, and this widget has ceased functioning. widget.js:1 TWITTER WIDGET: You can replace it with a new, upgraded widget from <https://twitter.com/settings/widgets/new/user?screen_name=ranganh> widget.js:1 TWITTER WIDGET: For more information on alternative Twitter tools, see <https://dev.twitter.com/docs/twitter-for-websites> widget.js:1

这意味着Twitter.Helper使用旧的和已弃用的Twitter API,应该进行修改以符合API更改。 您可以在文件中手动创建它: MvcApplicationProject\App_Code\TwitterGoodies.cshtml

If you look in the browser console, you will see errors:

TWITTER WIDGET: The Twitter API v1.0 is deprecated, and this widget has ceased functioning. widget.js:1 TWITTER WIDGET: You can replace it with a new, upgraded widget from <https://twitter.com/settings/widgets/new/user?screen_name=ranganh> widget.js:1 TWITTER WIDGET: For more information on alternative Twitter tools, see <https://dev.twitter.com/docs/twitter-for-websites> widget.js:1

This means Twitter.Helper use old and deprecated Twitter API and should be modified to conform API changes. You could make it manually in file: MvcApplicationProject\App_Code\TwitterGoodies.cshtml

更多推荐

MVC,application,Twitter,应用,电脑培训,计算机培训,IT培训"/> <meta name="de

本文发布于:2023-08-07 02:21:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1459442.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Twitter   Integration

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!