Twitter 如何在网站上嵌入最新推文?

Twitter 如何在网站上嵌入最新推文?,twitter,Twitter,在一个网站上,我需要它来显示一个帐户的最新推文 以前,访问Twitter的Goodies页面并限制一条tweet可以实现这一点。现在,新版本的Timeline embeds似乎对此没有选择,那么它是如何实现的呢?我可以使用我保存的旧版本1,但根据Twitters常见问题解答,所有旧版本明年都将停止工作,所以我想使用新版本1.1代码 下面是Twitter提供的新代码。只需要知道如何/在何处添加“count=1”,就像我对原始版本所做的那样 <a class="twitter-timeline

在一个网站上,我需要它来显示一个帐户的最新推文

以前,访问Twitter的Goodies页面并限制一条tweet可以实现这一点。现在,新版本的Timeline embeds似乎对此没有选择,那么它是如何实现的呢?我可以使用我保存的旧版本1,但根据Twitters常见问题解答,所有旧版本明年都将停止工作,所以我想使用新版本1.1代码

下面是Twitter提供的新代码。只需要知道如何/在何处添加“count=1”,就像我对原始版本所做的那样

<a class="twitter-timeline" href="https://twitter.com/example" data-widget-id="0000000000">Tweets by @example</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>

!函数(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);}(文档,“脚本”,“twitter wjs”);

有关更多选项,请点击此处查看如何显示最新的n条推文。只需更改数据tweet limit中的值



您的意思是不再有简单地将“count=1”等添加到嵌入中的方法了?为什么twitter会删除该功能,并要求使用插件或api只显示一条最新tweet?太好了,如果是的话,你能提供一个带有默认新twitter代码的示例吗?
  jQuery(function($){
    $(".tweet").tweet({
      join_text: "auto",
      username: "seaofclouds",
      avatar_size: 48,
      count: 3,
      auto_join_text_default: " we said, ",
      auto_join_text_ed: " we ",
      auto_join_text_ing: " we were ",
      auto_join_text_reply: " we replied ",
      auto_join_text_url: " we were checking out ",
      loading_text: "loading tweets..."
    });
  });