我使用此代码一段时间在任何网站上嵌入任何Twitter帐户推文,我也使用php从mysql数据库中获取Twitter帐户名称
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 6,
interval: 30000,
width: 172,
height: 205,
theme: {
shell: {
background: '#333333',
color: '#ffffff'
},
tweets: {
background: '#000000',
color: '#ffffff',
links: '#82cbed'
}
},
features: {
scrollbar: false,
loop: true,
live: true,
behavior: 'default'
}
}).render().setUser('<?php echo $twitter_is; ?>').start();
</script>
答案 0 :(得分:6)
我不同意shofnee。
截至2013年6月11日,Twitter已停止使用旧的API,这似乎已停止您的代码工作(我处于类似的位置)。更多信息可以在https://dev.twitter.com/blog/api-v1-is-retired 找到答案 1 :(得分:0)
尝试阅读 - https://twitter.com/javascripts/widgets/widget.js中的示例 可能会帮助
答案 2 :(得分:0)
如果您希望再次获得类似的信息,请查看Twitter开发人员博客中的这个操作方法。