ここに私の正確な_Layout.cshtmlがあります
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/Scripts/Tweets.js")
@RenderSection("Scripts",false)
<script type="text/javascript" src="http://cdn.jquerytools.org/1.1.2/full/jquery.tools.min.js"></script>
<script src="../../Scripts/Tweets.js" type="text/javascript"></script>
</head>
<body>
@{
if (ViewBag.IsAdmin ?? false)
{
<div class="controlPanel">
<a href="@Href("~/Post/Edit")">New Post</a>
@Html.ActionLink("Sign Out", "DeAuth", "Account")
</div>
}
else
{
<div class="controlPanel">
@Html.ActionLink("Log In", "Login", "Account")
</div>
}
}
<header>
<a href="@Href("~/")"><img src="@Href("~/Content/Images/gizmologo.png")" alt="Gizmo | Blog Solutions" title="Gizmo | Blog Solutions"/></a>
</header>
<section>
<div id="topSep" class="sep"></div>
<aside>
<img id="picture" width="100" height="100" src="@Href("~/Content/Images/dsykes.jpg")" alt="Picture" title=":P" />
<div id="twitterHeader"><a href="https://twitter.com/Sage0f_Lyricism">D.Sykes on Twitter</a></div>
<div id="tweets">
</div>
<div id="feedLink"><a href="@Href("~/Post/RSS")">RSS Feed</a></div>
</aside>
<div id="main">
@RenderBody()
</div>
<div id="bottomSep" class="sep"></div>
</section>
<footer>
<div id="copyright">Copyright © 2013, Gizmo Bloging</div>
</footer>
</body>
</html>
そして、これがロードされない Tweets.js スクリプトです...
$(document).ready(function () {
//$.getJSON("https://twitter.com/statuses/user_timeline.json?screen_name=ninanet&count=5&callback=?", // this is the OLD Twitter json call!
$.getJSON("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=ninanet&count=5&callback=?",
function (data) {
$.each(data, function (i, item) {
ct = item.text;
mytime = item.created_at;
var strtime = mytime.replace(/(\+\S+) (.*)/, '$2 $1')
var mydate = new Date(Date.parse(strtime)).toLocaleDateString();
var mytime = new Date(Date.parse(strtime)).toLocaleTimeString();
$("#tweets").append('<div>' + ct + " <small><i>(" + mydate + " at " + mytime + ")</i></small></div>");
});
});
});
何が問題なのかわかりません.Jqueryは正しく初期化されており、スクリプトも同様ですが、何も得られません..誰か助けてください!?