On a site I'd need it to show the latest tweet from an account.
Previously, going to Twitter's Goodies page and limiting to one tweet, would accomplish this. Now there new version of Timeline embeds do not seem to have an option for this, so how is it accomplished? I can use the old version 1 embed I have saved but all old ones will stop working next year according to Twitters FAQs, so want to use the new version 1.1 code..
Below is the new code Twitter provides. Just need to know how/where to add "count=1" as I could with the original version.
<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>
Click the icon located within the Tweet. From the menu, select Embed Tweet. This will open publish.twitter.com where you can customize the look of the embedded Tweet by clicking set customization options.
Here is how to display the latest n tweets. Just change the value in data-tweet-limit.
<a class="twitter-timeline"
href="https://twitter.com/twittername"
data-tweet-limit="1">
Tweets by @twittername</a>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With