Skip to content

Instantly share code, notes, and snippets.

@webapprentice
Created November 7, 2013 18:39
Show Gist options
  • Save webapprentice/7359678 to your computer and use it in GitHub Desktop.
Save webapprentice/7359678 to your computer and use it in GitHub Desktop.
Embed a live updating Twitter Timeline into a web page
<a class="twitter-timeline" href="https://twitter.com/BBCWorld" data-widget-id="395313647477481472">Tweets by @BBCWorld</a>
<script>
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){
js=d.createElement(s);
js.id=id;
js.src=p+"://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
}(document,"script","twitter-wjs");
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment