[英]Twitter Feed not working javascript
I have a javascript snippet that I use to get my twitter feed on my website. 我有一个JavaScript代码段,可用于在我的网站上获取Twitter提要。 I call on the file that the javascript is in and then reference it in the code.
我调用javascript所在的文件,然后在代码中引用它。 Recently, I have been having trouble getting the information.
最近,我在获取信息方面遇到了麻烦。 It is just blank.
它只是空白。 Any help would be awesome!
任何帮助都是极好的!
Here's the javascript: 这是JavaScript:
function AddTweet(TU,NP){
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: NP,
interval: 30000,
width: 'auto',
height: 'auto',
theme: {
shell: {
background: 'none'
},
tweets: {
background: 'none'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
behavior: 'all'
},
ready: function() {
setTimeout(init_sticky_footer, 1000);
}
}).render().setUser(TU).start();
}
Here's the HTML: 这是HTML:
<html>
<head>
<script type="text/javascript" src="/layout/plugins/tweet/tweet.widget.js"></script>
</head>
<body>
<div class="column">
<h3>Latest Tweets</h3>
<div class="block_footer_tweets">
<script type="text/javascript">
// ('YOUR USERNAME','NUMBER OF POSTS');
AddTweet('Bookerhighvpa', 2);
</script>
</div>
</div>
</body>
</html>
Five weeks ago Twitter retired the old v1 API, so you should use the new one. 五周前,Twitter淘汰了旧的v1 API,因此您应该使用新的API。
<a class="twitter-timeline" href="https://twitter.com/twitterapi" tweet-limit="2" data-widget-id="YOUR-WIDGET-ID-HERE">Tweets by @twitterapi</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.