将单行推文添加到网页

发布于 2024-09-27 16:22:34 字数 1456 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

静水深流 2024-10-04 16:22:34

最简单的方法是使用以下方法:

<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&count=2"></script>

只需将“用户名”替换为客户端的用户名和要显示的推文数量。用CSS设置样式就完成了!

This simplest way to do it is using this:

<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&count=2"></script>

Just replace "username" with the client's username and the count to however many tweets you want to display. The style with CSS and you are done!

吃不饱 2024-10-04 16:22:34

前几天这样做过。您可能想使用一个库来使事情变得更容易。首先使用 Jquery 的 getJSON() 获取他的 twitter JSON feed (http://twitter.com/status/user_timeline/.json?count=10&callback=?)。对返回的数据进行相应处理。

Did this the other day. You probably want to use a library for this to make things easier. First get his twitter JSON feed (http://twitter.com/status/user_timeline/.json?count=10&callback=?) using Jquery's getJSON(). Process the returned data accordingly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文